I'm trying to setup an OpenVPN server which would dynamically assign clients their IP addresses from given range and I need the server to have a specific static IP address which does not lie at the start of the address range (e.g. 192.168.0.200 instead of 192.168.0.1). Here's my server configuration file:
mode server port 1134 proto tcp6-server dev tap ca ca.crt cert server.crt key server.key dh dh1024.pem server 192.168.0.0 255.255.255.0 ; the following line does not work :-( ifconfig 192.168.0.200 255.255.255.0 client-to-client duplicate-cn keepalive 10 120 cipher AES-256-CBC comp-lzo max-clients 32 verb 15 mute 10
After studying the documentation and examples on the net I thought the "ifconfig ..." line would do the trick, but openvpn keeps assigning 192.168.0.1 to the virtual interface (tap0). During openvpn server initialization, this line can be seen:
Fri Apr 4 14:58:07 2014 us=410085 /sbin/ifconfig tap0 192.168.0.1 netmask 255.255.255.0 mtu 1500 broadcast 192.168.0.255
Why is openvpn ignoring the "ifconfig ..." line? I don't know if it is relevant, but I use openvpn 2.3 and Ubuntu OS.