Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
it works in pclinuxos on another machine and it works on this machine in windows but when i start it here in linux mint i loose my internet , although it doesnt give any errors
i asked around in irc and someone told me to add this line to my config file>
up /etc/openvpn/update-resolv-conf
i had to add extra arguments so it would accept that line , no errors but no internet, so i left it as it was
when you bring the VPN up can you ping the other end of it?
the command will likely be like 'ping -i tap0 178.73.206.129' (ping the remote end of the tunnel out the tunnel interface.
If that works, then most likely it is a routing issue. Otherwise your VPN is not up.
Do the ping test after you have enabled the VPN. If you have enabled it and the ping succeeds without the -i tap0 option then you have internet access from your box with the VPN up, just not through the VPN. Unless the interface name is not correct, check with 'ip addr' or ifconfig. Is tap0 the interface with the .223 address?
As far as I can tell, you have the .223 address locally and the .129 at the remote end of the tunnel.
The routes that are being set up above as part of the VPN make the remote end of the tunnel the default gateway. So if you VPN is not up you will not have internet access.
did you meant that file of the vpn conf file provided by the vpn company?
Yes.
If this is a commercial product, do they not support it? If your linux distro is not supported by them, then it is likely the setup scripts will need to be modified to get this to work, or it might not be possible at all.
When you connect to the server, openvpn pushes back the default gateway to the client machine. (route add net)
You can change this behaviour here: /etc/openvpn/server.conf
Quote:
push "redirect-gateway def1 bypass-dhcp"
Just put ; (rem) to the front of that line and only the 10.8.0.0(default openvnp server) network will be routed to the server.
The rest will be routed to the local gateway.
Like that:
Quote:
;push "redirect-gateway def1 bypass-dhcp"
Or if you want to add private networks you could do that with this command:
Quote:
push "route 192.168.0.0 255.255.255.0"
Then it will add this private network to the routing table on the client machine.
I had a look again your config and the reason you didn't find this because this one is at the server side.
You can't change this behaviour on the client side only at the server side.
When the client logging in to the server the config will run the route add command which is adding the remote gateway into the local routing table. (obviously it depends on the config how this behaves)
I had routing problem on my config when I installed openvpn and this was the issue in my config too.
When the redirect-gateway was in my config and I tried to reach a local PC on the LAN the whole traffic went through on the vpn.
I had checked it with tcpdump and I was really surprised about this behaviour. For example I pinged a local pc and the traffic went through on the server/vpn.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.