0

Currently my openvpn server has ip address 10.8.0.1. I want to change it to 10.9.0.1. I tried changing the following lines in server.conf

# Configure server mode and supply a VPN subnet
# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.9.0.0 255.255.255.0

But when I restart OpenVPN it is still getting the address 10.8.0.1. Is this the right way to do it?

1

1 Answer 1

3

You're doing it all right. Make sure that this address is not overridden later in the configuration file.

You should restart openVPN by executing:

sudo /etc/init.d/openvpn restart

Restarting server.conf only is possible with:

sudo /etc/init.d/openvpn restart server
2
  • When you say "not overridden later in the configuration file", are there any scenarios where you have several server a.b.c.d x.x.x.x lines (except for copy-paste errors)?
    – Matthieu
    Mar 8, 2017 at 12:17
  • 1
    @Matthieu Copy-paste errors are most likely to result in duplicates. I guess (but am not sure) that the cmdline is another way to override: openvpn --config /etc/openvpn/server.conf --server a.b.c.d x.x.x.x (when you use the init script, this should not happen, but when using NetworkManager or sth, it is worth checking out)
    – Lekensteyn
    Mar 8, 2017 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .