M
M
Marat Amerov2016-01-21 14:42:00
openvpn
Marat Amerov, 2016-01-21 14:42:00

Is it possible to exclude ip range from Openvpn traffic?

Hello.
In our country, popular instant messengers and many other necessary things are now blocked.
when connecting via Openvpn, there are inconveniences: it is impossible to access the local resources of the provider, there is no access to the personal account, etc.
Is it possible to configure it so that traffic with a certain range of ip clicks directly?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Daniil Muidinov, 2016-01-21
@DANic

You need to set up routing.
If a router acts as a gateway, then on it you need to add the gateway IP of your provider's gateway for the required subnet in the "Routes" settings category or similar for your router.

R
res2001, 2016-01-21
@res2001

As a rule, it is enough to register a route to this range directly, through the default gateway.
route add /?
OpenVPN in a typical configuration after establishing a connection on the client changes the default gateway address to the address of the OpenVPN server.
If it is necessary on the contrary, it is necessary to let through VPN only traffic to certain addresses, and everything else to the default gateway, then the scheme should be different.

Y
younghacker, 2016-01-21
@younghacker

On the router or on the machine where the VPN is installed, do what was said earlier. Write static routes through the interface to your provider. Keep in mind that DNS requests can go either to the VPN or through the ISP, depending on the settings on your VPN router. And if a CDN is used, then the answer may be different. Make a script that will check the target IP in DNS and change or notify you that the address you need has changed. Also, the internal resources of the provider may not be resolved in DNS from the outside, for example, by Google.
If we are talking about the provider's network, just peep their AS, get their networks and then write their networks as "static".
You will also have to figure out how to register routes in your particular system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question