Page 1 of 1
OpenVPN - Dedicated IP
Posted: Sat May 20, 2017 9:53 am
by AmirAlamani
I'm trying to setup an OpenVPN server which provides dedicated static IPv4 to each client. (e.g. 8.8.8.8 always for user1)
I have already tried "client-config-dir" method but cannot get it working.
Please advise.
Re: OpenVPN - Dedicated IP
Posted: Sat May 20, 2017 11:43 am
by AmirAlamani
I'm trying to setup an OpenVPN server which provides dedicated static IPv4 to each client.
I have a /24 Public IP address and 200 VPN clients. For example : Client1 -> 172.16.1.1 Client2 -> 172.16.1.2
I think there are two ways to achieve this. 1. set my public address range as DHCP IP pool 2. set /24 internal address as DHCP and use 200 iptables rules to forward packets like below:
iptables -t nat -A POSTROUTING -s 172.16.1.2 -o eth0:2 -j MASQUERADE
pons are that It would require 200 virtual interfaces and iptables rules.
method #1 seems to be more logical and I've already made efforts to make it work. OpenVPN connection will be successful but there won't be Internet access.
Already read most available articles on Google including this comprehensive one:
http://michlstechblog.info/blog/openvpn ... -a-client/
Re: OpenVPN - Dedicated IP
Posted: Sat May 20, 2017 11:56 am
by TinCanTech
AmirAlamani wrote:I have already tried "client-config-dir" method but cannot get it working.
Try again .. it is simple.
See:
https://openvpn.net/index.php/open-sour ... html#scope