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.
OpenVPN - Dedicated IP
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Sat May 20, 2017 9:45 am
Re: OpenVPN - Dedicated IP
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/
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/
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: OpenVPN - Dedicated IP
Try again .. it is simple.AmirAlamani wrote:I have already tried "client-config-dir" method but cannot get it working.
See:
https://openvpn.net/index.php/open-sour ... html#scope