Hello,
I'm running instances of OpenVPN on 2 different machines, both are running debian wheezy, OpenVPN is 2.3.10.
Each machine has 2 instances, 1 for udp and 1 for tcp. What I'm trying to do is increase the size of my subnets in case I ever need more connections using the server line in the config. However, when increasing both configs to a subnet mask of 255.255.248.0, I get the following errors when restarting the OpenVPN service on one of my servers:
ovpn-server.01.udp[9029]: ERROR: Linux route delete command failed: external program exited with error status: 7
ovpn-server.01.udp[9029]: Linux ip addr del failed: external program exited with error status: 255
ovpn-server.02.tcp[9047]: ERROR: Linux route delete command failed: external program exited with error status: 7
ovpn-server.02.tcp[9047]: Linux ip addr del failed: external program exited with error status: 255
ovpn-server.01.udp[9088]: ERROR: Linux route delete command failed: external program exited with error status: 7
ovpn-server.01.udp[9088]: Linux ip addr del failed: external program exited with error status: 255
ovpn-server.02.tcp[9116]: ERROR: Linux route delete command failed: external program exited with error status: 7
ovpn-server.02.tcp[9116]: Linux ip addr del failed: external program exited with error status: 255
ovpn-server.01.udp[9213]: Options error: --server directive network/netmask combination is invalid
ovpn-server.01.udp[9213]: Use --help for more information.
ovpn-server.02.tcp[9217]: Options error: --server directive network/netmask combination is invalid
ovpn-server.02.tcp[9217]: Use --help for more information.
ovpn-server.01.udp[24605]: Options error: --server directive network/netmask combination is invalid
ovpn-server.01.udp[24605]: Use --help for more information.
ovpn-server.02.tcp[24609]: Options error: --server directive network/netmask combination is invalid
ovpn-server.02.tcp[24609]: Use --help for more information.
Increasing only the UDP config to 255.255.248.0 works fine. Also, my other machine works fine as well when I increase both subnets in the configs. I really don't see how this can be an invalid combination, especially since it works on one machine.
These are the working configs:
UDP:
user nobody
group nogroup
dev tun
local <removed ip>
port 80
proto udp
#tun-mtu 1500
#fragment 1300
#mssfix
ca <removed path>
cert <removed path>
key <removed path> # This file should be kept secret
dh <removed path>
server 10.66.66.0 255.255.248.0
ifconfig-pool-persist ipp.01.udp.txt
push "redirect-gateway"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
#client-to-client
keepalive 10 120
cipher AES-192-CBC
comp-lzo
persist-tun
persist-key
client-config-dir ccd01udp
ccd-exclusive
verb 0
#log-append /var/log/openvpn/openvpn.log
#status /var/log/openvpn/status.log
# pam-auth
#plugin /usr/lib/openvpn/openvpn-auth-pam.so common-auth
#client-cert-not-required
#username-as-common-name
# management console
management <removed ip> 399
TCP:
user nobody
group nogroup
dev tun
local <removed ip>
port 443
proto tcp
#tun-mtu 1500
#fragment 1300
#mssfix
ca <removed path>
cert <removed path>
key <removed path> # This file should be kept secret
dh <removed path>
server 10.77.77.0 255.255.255.0
ifconfig-pool-persist ipp.02.tcp.txt
push "redirect-gateway"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
#client-to-client
keepalive 10 120
cipher AES-192-CBC
comp-lzo
persist-tun
persist-key
client-config-dir ccd02tcp
ccd-exclusive
verb 0
#log-append /var/log/openvpn/openvpn.log
#status /var/log/openvpn/status.log
# pam-auth
#plugin /usr/lib/openvpn/openvpn-auth-pam.so common-auth
#client-cert-not-required
#username-as-common-name
# management console
management <removed ip> 400