Accessing Internet via OpenVPN
For some reasons, my neighbour country (country A), where I need to travel frequently for business purpose, blocks access of some sites.
i wish to gain full access to the Internet whenever I am in country A. i then set up a vpn server (ubuntu) at home (country B, and no Internet restriction in country B). i wish to direct all internet access via the vpn server when i am in country A. Code:
That's to say: i have completed the installation of vpn and can connect successfully to the vpn server from the Internet. the problem is that the connection is limited from client to the vpn server only, failed to access elsewhere (neither the Internet or File server within the intranet). Code:
My settings: I am a newbie to networking. May I ask somebody's help to illustrate how to complete the configuration, in particular, the routing table and any things to do with the openvpn config files? Thanks a lots! |
Hi!
I got a similar setup working. In the server configuration file you should have something like Code:
push "redirect-gateway def1" Code:
echo 1 > /proc/sys/net/ipv4/ip_forward Hope it works out, cheers! |
Thanks for response!
Clients connecting thru' VPN can now access hosts in 192.168.1.0. However, when I add [push "redirect-gateway def1"] or [push "redirect-gateway"] to server.conf, clients would not be getting access to the Internet or even other subnets. I try to traceroute and see packet has gone through 10.8.0.1 (the openvpn) server, but then nothing else. I have also check openvpn messages upon login and see something like: Quote:
I then try to add to server.conf: Quote:
I guess it should be the OpenVpn server fails to route client's traffic and wonder if anything to do with iptables? |
Hi,
I'm not sure I fully understand. Did you get access to 192.168.0.1 after adding the push-command to the server configuration file and running the two commands on the server? Or did you already have access? Regarding the messages on startup, I don't see any similar output. However, as far as I understand it, your default gateway should be 10.8.0.1. |
All times are GMT -5. The time now is 10:55 PM. |