E
E
Eugene2019-06-04 12:02:47
openvpn
Eugene, 2019-06-04 12:02:47

iptables + openvpn How to prohibit route through VPN for a client so that only it works through the provider?

Good day!
How to prohibit route through VPN for a client so that only it works through the provider, and other clients use the final VPN gateway, while the local network is available to everyone?
Without settings on client machines (route prescribing).
Interface: TAP.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zohan1993, 2019-06-04
@zohan1993

1. Add to the OVPN server config:
------------------------------------ -------
client-config-dir /etc/openvpn/ccd
-------------------------------- -----------------
2. For the desired client, add parameters:
/etc/openvpn/ccd/client1
----------------- --------------------------------
# push-reset, forbids giving this client the general parameters assigned by the push command in the server config file
push-reset
# The route we want to send to this client
push route 192.168.100.0 255.255.255.0
-------------------------------- -----------------

D
Denis Bazarnov, 2019-06-04
@bazden

How to prevent VPN clients from accessing the Internet, leaving access only from a given ip?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question