Results 1 to 2 of 2
Thread: iptables fun for VPN
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
06-13-2012 #1
- Join Date
- Apr 2012
- Posts
- 45
iptables fun for VPN
I have managed to set up my openvpn server 90%.
If i disable iptables it connects properly but then i have no internet, but if i have it enabled, i cant connect to the vpn. I have the feeling it has somethign to do with these three lines from the tutorial i was following:
Code:Issue the following commands to configure iptables to properly forward traffic through the VPN: iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT iptables -A FORWARD -j REJECT iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
If someone could explain in 'plain english' what those lines do I would be grateful and perhaps i could just figure it out. I really need to get a book in iptables. I know that I need it on otherwise I can connect to the vpn but my packets dont get forwarded to the outsid internet.
Stu
-
06-13-2012 #2
- Join Date
- Apr 2012
- Posts
- 45
turns out that openvpn creates clients with ip 10.8.0.x where x changes so that explains that.
Just needed to have 'iptables -I INPUT -p tcp --dport 1194 -j ACCEPT' added to that tutorial.
Unfortunately my traffic still isnt getting correctly forwarded though... i have correctly set ip net forwarding to 1 in the sysctl file.