Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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