Possible bug in processing OpenVPN client file when a .dev remote host is specified

I believe I've found a bug in how the web front end imports and transforms an OpenVPN client file. Specifically the remote aaa.bbb.ccc line is excluded when attempting to connect to a DNS name in the .dev TLD. To reproduce:

  1. Get any valid OpenVPN client config file and replace the remote line with remote foo.bar.dev.
  2. Start the VPN via the web UI
  3. ssh into the modem and look at the config file the OpenVPN binary is referencing (/tmp/ovpnclient/ovpnclient)

Results:
The remote ... line is missing, and the VPN connection hangs until it times out.

Expected:
The remote ... line is persisted into the config that the OpenVPN binary is reading.

I'm reproducing this on a GL.iNet GL-MT1300.
Admin Panel Version: 4.3.17
OpenWrt Version: 22.03.4 r20123-38ccc47687
Kernel Version: 5.10.176

1 Like

Thank you for your eagerness to point out our issues. Please change the code in /lib/netifd/proto/ovpnclient.sh to the following figure. This should resolve the issue you pointed out.

1 Like

Thank you for the help in chasing down this issue, that fixed it!