No internet access via home VPN server

ClowReed

Distinguished
Oct 3, 2008
30
5
18,565
Hello!

I just did set up a VPN server via DD-WRT so my friend that lives in another country could access my internet gateway and play a game that is region locked (no, we can't use Tunnel Bear for maximum data limit reasons). So, this way the game server thinks he's accessing from my home network here in my country and won't block him anymore.

Ok, that said, let's get technical...

I used PPTP VPN server and I can connect to it but when connected the internet is lost.

Using the default gateway IP (192.168.1.1) as the DNS setting, as any other setting won't even give me network access.

I think it is somehow related to my DHCP settings or I need to do some manual routing so it could route the internet interface to the VPN interface, but I really don't know how to do that.

The way it is now he can only play with me as if we were going to play in the same LAN, but, as stated above, this is not the case and we could use hamachi for that if that were the case.

I know this is confusing but any input will be much appreciated and if more info is needed I'll provide ASAP. Already googled everywhere but can't find this setting.

Thanks in advance!

 
Solution
Hey, just in the case anyone stumble upon the same problem, the user Per Yngve Berg solved the problem on the DD-WRT forum on the following link: LINK TO THE SOLUTION

You have to enable NAT from the VPN sub-net.

Try this in the Firewall:

iptables -t nat -I POSTROUTING -o `get_wanface` -j MASQUERADE

I hope this helps.

When he says "try this in the firewall" you just need to go to the Administration tab and then Commands and then paste that line there and hit "Run" and that's it.

ClowReed

Distinguished
Oct 3, 2008
30
5
18,565
Hey, just in the case anyone stumble upon the same problem, the user Per Yngve Berg solved the problem on the DD-WRT forum on the following link: LINK TO THE SOLUTION

You have to enable NAT from the VPN sub-net.

Try this in the Firewall:

iptables -t nat -I POSTROUTING -o `get_wanface` -j MASQUERADE

I hope this helps.

When he says "try this in the firewall" you just need to go to the Administration tab and then Commands and then paste that line there and hit "Run" and that's it.
 
Solution