tanay
Posts: 2
Joined: Wed Jan 07, 2015 7:03 pm

VPN NAT Routing

Wed Jan 07, 2015 7:12 pm

I managed to configure pptpd on my Rpi. I am able to connect from android phone via internet and can also access the website hosted by the web server of the raspberry pi, but I am not able to access the internet via Rpi VPN. I found some docs on internet about NAT routing but none could help fix it.

Code: Select all

#Added when configuring PPTP VPN:
sudo iptables -t nat -A POSTROUTING -s 192.168.0.201/24 -o eth0 -j SNAT --to 192.168.1.50
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
localip is 192.168.1.50
remote ip ranges from 192.168.0.201 to 205

I need help with NAT to access internet across VPN.

Return to “Troubleshooting”