To limit the routing OpenVPN to one network

0 like 0 dislike
10 views
There is a Ubuntu machine, which connects via OpenVPN on a working network, IP is given by DHCP and is always different. Now all traffic goes through the VPN server, regardless of the purpose. For example, browsing or torrents.

I would like to limit the routing so that the VPN connection was traffic intended directly for the production network and no other.
The idea can write a simple script that will remove the path created by the OpenVPN client, and recreate a new one, but I think there is already a ready solution that I just haven't found.
by | 10 views

6 Answers

0 like 0 dislike
the routing on the destination host to configure. default the provider routes "Saturnalia" network through a VPN-peer. in General, it seems like, by default openvpn and it works. if he gives you the default client, it's in the config right.
by
0 like 0 dislike
so OpenVPN can be setup per user to do.
set client-config-dir, it put a personal configs for different users. General routes write to the config servers, additional to each according to need and connect the client gets only what is set for him. who don't need a gateway't have it. the truth will have to bear rzadca gateways in individual settings if it used Rils from the General config. or look for it in the client "wipe", can have such an opportunity Yes, I don't know about it
by
0 like 0 dislike
Try to add in client config:
\r
route-nopull
route 192.168.0.0 255.255.255.0
\r
where 192.168.0.0 255.255.255.0 — Your production network.
by
0 like 0 dislike
on openvpn server:
* remove (commented) the option push "redirect-gateway"
* presuposes openvpn
* rejoice.
by
0 like 0 dislike
I did this:
\r
sudo apt-get install network-manager-openvpn-gnomeIn the network Manager we import of flick .ovpn (OpenVPN settings) In the properties for VPN connection, go to "IPv4 Settings", there are routes (Routes) -> Put the check in the "Use this connection only for resources..." If you need DNS In the IPv4 settings In the profile set (Automatically VPN) addresses only and set DNS server. Below I have earned CSN, I had to reboot. Routes are earned immediately after connecting.
by
0 like 0 dislike
Many thanks to all! :)
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
asked May 12, 2019 by freezl
0 like 0 dislike
5 answers
0 like 0 dislike
2 answers
asked Mar 28, 2019 by juffinhalli
110,608 questions
257,186 answers
0 comments
29,057 users