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
Giving a specific client no access to internet
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 13
- Joined: Wed Jun 15, 2016 6:26 pm
-
- OpenVPN Super User
- Posts: 310
- Joined: Tue Apr 12, 2011 6:22 am
Re: Giving a specific client no access to internet
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.
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.