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.
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:
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 (255.255.254.0). Replace
server 10.20.0.xx 255.255.255.0
by:This can hold addresses between 10.20.0.0 - 10.20.0.254 and 10.20.1.0 - 10.20.1.254. (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.