I set up a VPN server on my Pi3 following the same steps that I did in Ubuntu (link). I use that VPN server daily without issue.
I can successfully connect to the VPN, but I cannot get to the internet. I have tried or checked:
- disabling ufw
/etc/default/ufwto includeDEFAULT_FORWARD_POLICY="ACCEPT"cat /proc/sys/net/ipv4/ip_forward-->1sudo nano /etc/openvpn/server.confcontains without comments:push "redirect-gateway def1 bypass-dhcp"push "dhcp-option DNS 208.67.222.222"push "dhcp-option DNS 208.67.220.220"
- I then read some posts about changing
iptableswhich I did not have to do in ubuntu, but gave it a shot anyway (not really knowing what I am doing here)sudo /sbin/iptables -P FORWARD ACCEPTandsudo /sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE
- Another
iptablesedit:sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source 192.168.107.3
- ssh into the pi and can
ping google.com
-Ffirst (which booted me from my ssh) bc-Xhadiptables: Too many links.but then went back and did-X. Any other ideas? I would like to get it working without pivpn if possible... – atclaus Aug 05 '17 at 20:21sudo iptables -Land-SI do not see the rule you have me add. Should I? Where else can I look? – atclaus Aug 05 '17 at 20:35eth0towlan0as I am connected over wireless. Should have caught that. Followed the instructions at this link to add a boot script that does the iptables automatically. https://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing/ – atclaus Aug 05 '17 at 21:17