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-set-a-static-ip-address-for-a-client/