Linux – Multiple Subnets on OpenVPN

centoslinuxopenvpnrouting

Let me start of by saying that I/m new to posting questions here. So if I do no post enough information, please let me know. Let me know what more I should post.

I'm using OpenVPN for my VPN solution. We're about to add more remote devices which will exceed the maximum amount of IPs that the DHCP can hand out for one single subnet.

How can we config OpenVPN to start handing out IPs for another subnet?

For example, our subnets would be:

10.8.0.0/24
10.9.0.0/24
10.10.0.0/24
etc...

Currently we only have the single subnet of 10.8.0.0/24.

Best Answer

Please check this part from OpenVPN official howto page.

Basically, you can use multiple ifconfig-push directives in your OpenVPN configuration to use multiple clients subnets. The pros of such approach is that it allows you to define different access policies for different subnets.