0

I have client A and client B connected to OpenVpn Acess Sever. In AS i have "allow internet through vpn" disabled. How can i route internet through vpn for Client A only? Client B should not pass internet traffic through VPN.

1 Answer 1

1

enable "allow internet through vpn" in the AS and in the client you dont want to redirect the traffic through the vpn put this at the end of the conf file

route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway 

that's it tells you client machine not to use the vpn as internet connection then that machine it will be connected to the vpn but it will be using the local internet

5
  • 192.0.0.0 is the gw right? Jul 5, 2020 at 22:30
  • yes just as it is and it will work try it and tell me ;)
    – denn0n
    Jul 6, 2020 at 2:56
  • there is another way to get the same result but honestly i dont remember how do you have to search it !
    – denn0n
    Jul 6, 2020 at 3:03
  • I enabled internet via vpn. Client A &B had internet via VPN. On client B (openwrt) I put the routes in my .ovpn file. Yes I was not connected to internet via VPN but I could not see client A which is on the 10.10.10.0 subnet. Before routes I could get from Client B to Client A , no problem. Any help? Jul 21, 2020 at 23:39
  • If you have client to client set into the server there should not be a problem maybe something whit a firewall !
    – denn0n
    Jul 22, 2020 at 0:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .