Hi there,
I am currently living in Malaysia but and from the UK. I have set up a Pi VPN server back in the UK at my parents house to access their network and generated an .ovpn file shown below (I've removed the sensitive information and replaced with XXXX). I had a friend test the connection in Malaysia before I left the UK, and it worked no problem. I also used it with the Open VPN software both on my phone and laptop in the UK and on my return to Malaysia and it works very well.
My problem came when I tried to add it onto my Asus GT-AX11000 router so that I could channel a portion of my network onto this VPN connection. I've used it before with another VPN connection and it worked fine, but when I try it with this file, I get an error. When I put this ovpn file into the OpenVPN software I put in a password but no username. When I try it on the Asus router, it has a box for User and Password so I put my password in but leave the user box empty. Here is the system log from my router:
Jun 21 16:56:10 rc_service: httpd 1235:notify_rc stop_vpnc
Jun 21 16:56:33 rc_service: httpd 1235:notify_rc restart_vpnc
Jun 21 16:56:35 vpnclient5[10561]: Multiple --up scripts defined. The previously configured script is overridden.
Jun 21 16:56:35 vpnclient5[10561]: Multiple --down scripts defined. The previously configured script is overridden.
Jun 21 16:56:35 vpnclient5[10561]: Multiple --route-up scripts defined. The previously configured script is overridden.
Jun 21 16:56:35 vpnclient5[10561]: OpenVPN 2.4.7 arm-buildroot-linux-gnueabi [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Apr 30 2020
Jun 21 16:56:35 vpnclient5[10561]: library versions: OpenSSL 1.0.2u 20 Dec 2019, LZO 2.03
Jun 21 16:56:35 vpnclient5[10562]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Jun 21 16:56:35 vpnclient5[10562]: neither stdin nor stderr are a tty device and you have neither a controlling tty nor systemd - can't ask for 'Enter Private Key Password:'. If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache.
Jun 21 16:56:35 vpnclient5[10562]: Exiting due to fatal error
I don't get this error when I use OpenVPN, so it must ignore the problem. Is there anything I can do to modify the OVPN file to prevent this error occurring? if not then how must I re-generate the OVPN file such that it would work? I would like to avoid this as I'll have to explain it to someone over the phone!
Nick
Contents of OVPN file:
client
dev tun
proto tcp
remote XXXX 443
resolv-retry infinite
nobind
remote-cert-tls server
tls-version-min 1.2
verify-x509-name XXXX name
cipher AES-256-CBC
auth SHA256
auth-nocache
verb 3
-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
XXXX
-----END ENCRYPTED PRIVATE KEY-----
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
XXXX
-----END OpenVPN Static key V1-----