What's new

Openvpn server on Asus Merlin router ip allocations

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ColHut

Occasional Visitor
G’day,

Previously my open vpn server always allocated ip addresses to clients as 192.168.1.6, 10, 14, and 18.

I thought maybe something to do with the explanation by JanJust here:


Yesterday after resetting the router it allocated .1 and .2 instead of the expected .6 and .10.

This plays havoc with my sync and rtrr jobs on the client NAS’s.

What have I done. :)

regards
 
That's a very old thread, when the net30 topology was the default. But OpenVPN is now changing the default topology to subnet in most cases (NOT unless the server has specifically configured net30). So if you updated the firmware recently, it may be that you're NOW being allocated from the 192.168.1.0/24 subnet, starting w/ .2 and moving upward .3, .4, etc.

Here's a dump from 386.4 clearly showing a subnet topology by default.

Code:
admin@lab-merlin1:/tmp/home/root# cat /tmp/etc/openvpn/server1/config.ovpn | grep topology
topology subnet

In such cases, you'll need to either explicitly add net30 to the custom config field ...

Code:
topology net30

... or else change your ifconfig-push directives to use a subnet specification ...

Code:
ifconfig-push 192.168.1.2 255.255.255.0

I believe the plan w/ OpenVPN is to eventually deprecate net30 completely, so perhaps now is a good time to get off that topology anyway.
 
I switched topology to subnet years ago. According to the OpenVPN manual:

subnet
The recommended topology for modern servers. Note that this is not the current default. Addressing is done by IP & netmask.

net30
This is the old topology for support with Windows clients running 2.0.9 or older clients. This is the default as of OpenVPN 2.3, but not recommended for current use. Each client is allocated a virtual /30, taking 4 IPs per client, plus 4 for the server.
 
Thanks very much. Really appreciated. I will have a think about whether to embrace the new or specify the old.

regards
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top