I started an openvpn server about a year ago. As I didn't know what I was doing I left it as a /30 network. Now I have 40-50 (and growing) clients, each of which is using 4 addresses.

How do I configure it so that it will move on to the next set of addresses when this block runs out? (i.e. I'm using 10.20.0.xx now. I want it to move to 10.20.1.xx, etc)

Is this even possible?


I don't think it's possible. The closest solution I think is to run another OpenVPN server on another port with the other pool.

  • So I would need to create a new server for each block of addresses? ouch. – ethrbunny Mar 22 '11 at 22:00
  • @ether Not fun, I know. :\ – coredump Mar 22 '11 at 22:01

As coredump said, you'll need to run multiple servers but to do that, you only need another config file. By default when you start openvpn daemon it reads all the config files in the directory.

You change the:

port 1194

Line to another port on the 2nd config file and the daemon will listen to both ports, making 2 VPN servers. (of course you'll need to change the address pool on the other file too)

If you changed the default start command to start only your config file, you'll need to add the 2nd one.


Note: the next answer is theoretically possible, but I've not tested it myself

Instead of assigning the ranges manually, you can expand the netmask to include 10.20.1.xx using a netmask of 23 ( Replace server 10.20.0.xx by:


This can hold addresses between - and - (IP calc). For the full details on subnetting, see How does Subnetting Work?

You can extend this range to prepare for the future of course.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.