View previous topic :: View next topic |
Author |
Message |
pyxel n00b
Joined: 04 Nov 2005 Posts: 44 Location: Bratislava/brussels
|
Posted: Fri Jun 08, 2007 7:36 pm Post subject: NAT through VPN |
|
|
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: |
[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. |
|
Back to top |
|
|
SiberianSniper Guru
Joined: 06 Apr 2006 Posts: 381 Location: Dayton, OH, USA
|
Posted: Fri Jun 08, 2007 7:47 pm Post subject: |
|
|
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: | 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. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|