Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

NAT through VPN

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
pyxel
n00b
n00b
User avatar
Posts: 44
Joined: Fri Nov 04, 2005 5:09 pm
Location: Bratislava/brussels
Contact:
Contact pyxel
Website

NAT through VPN

  • Quote

Post by pyxel » Fri Jun 08, 2007 7:36 pm

Hello all,

In my work we are using CISCO phones on local lan. Now, I have my personal server at home connected to the VPN,, I puted in an additional network card. In fact I need to put this phone on the VPN:

Code: Select all


[CISCO ROUTER IN OFFICE]..... |VPN via INTERNAT| .... |eth1 (vpn device) --- eth0 (connected to the phone)| .... |phone|.

Now, I have configured the phone correct, it has a local IP address, but the only thing I need it connect it to VPN. Can someone tell me how? Using iptables I guess, but I'm not able to find the rules that work. Please advice.
Top
SiberianSniper
Guru
Guru
User avatar
Posts: 384
Joined: Thu Apr 06, 2006 3:00 am
Location: Dayton, OH, USA

  • Quote

Post by SiberianSniper » Fri Jun 08, 2007 7:47 pm

If you have iptables all set up in your kernel (with NAT, POSTROUTING, MASQUERADING, all that good stuff), you should be able to do this:

Code: Select all

emerge iptables
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward 
One word of warning, I'm not sure if it still does or not, but I've seen Cisco's VPN client disable all other net devices on a computer, so eth0 might not work. If you run into that, I'd recommend using vpnc instead.
Top
Post Reply

2 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic