Results 1 to 2 of 2
I'm running VPNC on my wrt54g with DD-WRT vpn firmware. I'm using this script. When I telnet in and start VPNC everything runs smooth. I'm not having trouble connecting. Now ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-03-2009 #1
- Join Date
- Jan 2009
iptables and vpnc
When I telnet in and start VPNC everything runs smooth. I'm not having trouble connecting.
Now on the page where the script is, it recommends that i add these rules to iptables:
iptables -A FORWARD -o tun0 -j ACCEPT iptables -A FORWARD -i tun0 -j ACCEPT iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
I'm am a newb when it comes to iptables. I've been reading docs on it all day, and I still can't figure out the necessary rules to accomplish my aim.
If any one can shed some light on this, i'd appreciate it
- 01-03-2009 #2
You want to use the source and destination for this.
For example lets say 192.168.1.21 is one of the ip address you want to access the VPN;
iptables -A FORWARD -o tun0 -s 192.168.1.21 -j ACCEPT iptables -A FORWARD -i tun0 -d 192.168.1.21 -j ACCEPT
And forward in if the packet is going to 192.168.1.21
There are many ways you can write your rules. Take a look at this TUTORIAL that explains all the iptables switches.
The adventure of a life time.
Linux User #296285