I have setup OpenVPN on a Windows Server 2012, and am accessing it from a single Windows 7 client (in future I will be using multiple clients with a single server). I just need to be access a software license server installed on the same server machine. The server is remote and can only be accessed through Windows Remote Desktop. While I am connected to the server over RDP, I can connect the server and client over OpenVPN and everything works perfectly. But as soon as I close the RDP session (but not log-out), the OpenVPN connection is immediately killed on the server side. When it closes the server log reports:
Thu Jun 13 10:36:44 2013 us=471910 nickw-laptop/CLIENTIP:65044 MULTI: bad source address from client [fe80::b451:7135:e21c:3428], packet dropped
Thu Jun 13 10:36:57 2013 us=45568 nickw-laptop/CLIENTIP:65044 MULTI: bad source address from client [fe80::b451:7135:e21c:3428], packet dropped
Thu Jun 13 10:36:59 2013 us=635190 TCP/UDP: Closing socket
Thu Jun 13 10:36:59 2013 us=635190 C:\Windows\system32\route.exe DELETE 10.8.0.0 MASK 255.255.255.0 10.8.0.2
Thu Jun 13 10:36:59 2013 us=650790 Route deletion via IPAPI succeeded [adaptive]
Thu Jun 13 10:36:59 2013 us=650790 Closing TUN/TAP interface
Thu Jun 13 10:36:59 2013 us=650790 SIGTERM[hard,] received, process exiting
Thu Jun 13 10:36:59 2013 us=650790 MANAGEMENT: >STATE:1371083819,EXITING,SIGTERM,,
RWRRWRWRWWWWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRRRR
WRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWWWWRWRWRWRWRWR
WRWRWRWRWRRRRWRWRWRWWWRRRRWWWRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRwrWRRwrWRwrWRRwrWRRRWWWWWWWWWRWRWWRRRRRRRRWWRRRRRRRRRRRRRRRRRRRRRW
When I log back in to the server by RDP, exit OpenVPN, restart OpenVPN, and connect, everything works fine again until I kill the RDP connection.
I have made minimal modifications to the supplied sample server and client config files, only modifying the keepalive and ping-restart statements to ensure that the server is always on and ready for incoming client connections which will come and go from different machines. The connection kept timing out and killing the connection with SIGUSR1 with the default settings. I am also using port UDP 7812 instead of the standard UDP 1194.
My server config is:
port 7812
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
inactive 0
cipher BF-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 5
My client config is:
client
dev tun
proto udp
remote SERVERIP 7812
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files (x86)\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\nickw-laptop.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\nickw-laptop.key"
ns-cert-type server
cipher BF-CBC
comp-lzo
verb 5
I'd be really greatful for any advice as I have spent days just getting to this point.
Ta.