Page 1 of 1

Route all internet traffic through VPN to a unique group

Posted: Tue Sep 06, 2022 3:41 pm
by martinvox
Hello everyone ! How are you ?

I just created a group in OpenVPN and assigned the users to it. I need to forward and router ALL internet traffic (Income/Outcome) through the VPN. I have a client that requires to have a US based IP (users are in Argentina).

I did find the option under VPN Settings to route all traffic through VPN, but I just want to do it for this particular group. I could not find the way to do it on the documentation, forums, google, reddit, etc.

Is this possible ? Thanks !

Re: Route all internet traffic through VPN to a unique group

Posted: Tue Sep 13, 2022 10:46 am
by openvpn_inc
Hello martinvox,

It is described here:
https://openvpn.net/vpn-server-resource ... s-settings

In particular this bit:

Redirect internet traffic for a user, but don't push DNS servers:
./sacli --user <USER_NAME> --key "type" --value "user_compile" UserPropPut
./sacli --user <USER_NAME> --key "access_to.0" --value "+NAT:0.0.0.0/1" UserPropPut
./sacli --user <USER_NAME> --key "access_to.1" --value "+NAT:128.0.0.0/1" UserPropPut

Redirect internet traffic for a group, but don't push DNS servers:
./sacli --user <GROUP_NAME> --key "access_to.0" --value "+SUBNET:0.0.0.0/1" UserPropPut
./sacli --user <GROUP_NAME> --key "access_to.1" --value "+SUBNET:128.0.0.0/1" UserPropPut

Please read the document for more information.

Kind regards,
Johan