docker-openvpn
docker-openvpn copied to clipboard
Change Topology to subnet instead of net30 to utilise addresses more efficiently
First, thanks for the great work!
We actively use OpenVPN and have the server configured with the -s 192.168.0.0/24 option. We were assuming that this would support ~256 connected users but have recently started seeing errors - no free --ifconfig-pool addresses are available.
I saw a related discussion here https://github.com/kylemanna/docker-openvpn/issues/444 & have updated our server mask for more IPs.
However, as part of investigation, I came across the following page that says modern OpenVPN should be running in subnet mode instead of net30.
https://docs.netgate.com/pfsense/en/latest/vpn/performance.html#topology
When I checked our server logs, I saw a bunch of logs containing topology net30:
... route 192.168.255.1,topology net30,ping 10,ping-restart 60,peer-id 43,...
The OpenVPN configuration docs recommends using topology subnet as well.
I have regenerated config for my server with -e "topology subnet" & verified that the config pool log shows increased size.
Thu Nov 25 10:34:50 2021 IFCONFIG POOL: base=192.168.8.2 size=1020, ipv6=0
It would be nice to have this option by default.