Hi,
I wanted to setup my PC or virtual machine so that my open vpn was the only route in and out. So if the vpn was down there is no connection.
I thought I could delete the default route i.e. 0.0.0.0 mask 0.0.0.0 gateway ip.of.router
Then add a static route to the open vpn server ip address i.e. ip.of.vpn.server mask 255.255.255.255 gateway ip.of.router
It works, but not very well, as i can connect to the vpn but websites dont load.
I assume this is because openvpn creates new routes under a new ip range for the vpn connection...
How can i make it that the VPN in the only way in or out? (i want to use the same server ip everytime)
Thanks
VPN Only no other routes wanted
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 1
- Joined: Tue May 29, 2012 7:49 pm
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: VPN Only no other routes wanted
add
to the server config, restart the server and reconnect the client; all traffic should now go via the VPN server.
Code: Select all
push "redirect-gateway def1"