Page 1 of 1

Giving a specific client no access to internet

Posted: Tue Mar 07, 2017 7:18 pm
by darellon
Hi all,
i got a Openvpn server set up and only want access it with two clients. Client #1 is able to access the internet through the server. However, how would i restrict Client #2's access to the internet through the server? i only want Client #2 to access the Network

Re: Giving a specific client no access to internet

Posted: Mon Mar 20, 2017 12:15 pm
by TiTex
create client configuration for the client that you want to allow to access the internet , specify a "static ip" for him/her , then only allow this IP to NAT
linux example: iptables -t nat -A POSTROUTING -s vpn-client-ip -o eth0 -j MASQUERADE
where vpn-client-ip is the IP you configured for him , and eth0 is the network interface with internet access.