Giving a specific client no access to internet

Scripts to manage certificates or generate config files
darellon
OpenVPN User
Posts: 14
Joined: Wed Jun 15, 2016 6:26 pm

Giving a specific client no access to internet

Postby darellon » Tue Mar 07, 2017 7:18 pm

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

TiTex
OpenVPN Expert
Posts: 206
Joined: Tue Apr 12, 2011 6:22 am

Re: Giving a specific client no access to internet

Postby TiTex » Mon Mar 20, 2017 12:15 pm

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.


Return to “Cert / Config management”

Who is online

Users browsing this forum: No registered users and 4 guests