I have a problem with creating new OpenVPN Packages, when I try to save the new package I get an internal server error.
In the log I can find this error message:
Use of uninitialized value $error in join or string at /usr/lib/perl5/5.30.0/Carp.pm line 630.
Net::IPv4Addr: invalid IPv4 address: at /var/ipfire/general-functions.pl line 769.
[Tue Jan 19 13:35:37.195020 2021] [cgid:error] [pid 1882:tid 124172579620416] [client 192.168.120.37:8791] End of script output before headers: ovpnmain.cgi, referer: https://192.168.120.1:444/
We found the problem, in the file “/var/ipfire/ovpn/routes_push” was an empty line.
After a restart of the ovpn-service the VPN-config was not loaded correctly and the client connections had warnings about different cipher configs between server and client. (and some routes were not pushed because the config stopped at the empty line)
Even though the config was correct, different settings were used by the server so after some searching we found the empty line which after removing cleared the problems with the config and the web-gui.