PDA

View Full Version : [ubuntu] VPN internet access



pspkicks316
January 10th, 2011, 07:11 PM
I've got VPN setup and working on my server. I can VPN into the server and access my local network from anywhere. It uses pptpd for it. My problem is that I can't access the internet once I'm connected to my VPN. Is it possible to allow internet access through VPN?

I mainly would just like to be able to connect, access my local network, and still browse the internet. Is there anything specific I need to change?

Dr_Deadmeat
January 12th, 2011, 12:23 AM
You might try to edit the file /etc/sysctl.conf and uncomment the line which says net.ipv4.ip_forward=1 and then run sysctl -p

That will enable ip forwarding on the computer, and that was what I needed to make it work on my server.

pspkicks316
January 12th, 2011, 06:16 PM
I already have it uncommented. Any other ideas?

bsntech
January 12th, 2011, 07:29 PM
Check your routes by doing a 'route' command and see where the default route is. You may have to configure a script that once you login to VPN, it sets a route for that network to use the ppp connection and the default route through your regular connection.

pspkicks316
January 12th, 2011, 08:00 PM
I'm not quite sure what you mean, or how I would do this.

My server's IP is 192.168.0.192

On the server, route gives me
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
That's looks fine, I guess.

With my Android phone using VPN I get:
http://i.imgur.com/G6DZ0.png

ephmanjmm
January 12th, 2011, 11:14 PM
I am not using pptp but rather the Cisco compatible vpn client so YMMV. On the IPv4 Settings tab there is a Routes button. From there, there is a check box to use this connection only for resources on this network. That solved the problem for me.

pspkicks316
January 13th, 2011, 12:43 AM
I am not using pptp but rather the Cisco compatible vpn client so YMMV. On the IPv4 Settings tab there is a Routes button. From there, there is a check box to use this connection only for resources on this network. That solved the problem for me.

That's a client, this is a server. Thanks for the input though!