We had a running OpenVPN AS at our office that suddenly stopped working (even the web administration completely refuses connections. The browser explicity claims that the site refused to connect to https://localhost:943)
These are the facts:
The server has two network interfaces, eth0 and eth1 (to listen to exposed services like FTP)
At some (unknown) time eth1 was renamed to enp5s0 I guess due to
I installed webmin and after login for the first time it complained that some firewall rules had to be "fixed" (I'm not sure if such fixing caused the problem since the VPN was not used but after a few days)
OpenVPN service (openvpnas) is up and running

The problem with the VPN was discovered (among other services that stopped working also) and then I found that enp5s0 got a new IP address, so I forwarded the appropiate ports (TCP/943 and UDP/1194) to such new IP
Some services ran again with other forwardings to the new IP

I guess there are two solutions here:
Rename enp5s0 back to eth1, but as I read that it's not recommended and I'm not sure if it has something to do with OpenVPN (I stopped the ufw service and the problem persisted)
Somehow configure OpenVPN to listen to the new IP and/or interface

Since the OpenVP AS web admin is unaccesible, how can I configure it? I would not like to use this:
since it claims it will completely wipe out the (very hard to tune) configuration (where it is located by the way?)

Any solution to this mess?


After some digging I realized the configuration files (sqlite databases) are located at:
In particular config.db holds several parameters and the value column holds (as its name implies) a value for the parameter in the name column.
(sqlite is needed upon here. You can install it with sudo apt-get install sqlite)
So, enter:
sudo service openvpnas stop
cd /usr/local/openvpn_as/etc/db
sudo sqlite3 config.db
Check the (second) interface listening:
SELECT * FROM config where value='eth1'; // or whatever your previous second interface is. This step is just for checking
Now update the value:
update config set
value='enp5s0' // or whatever your new second interface is
where value='eth1';

sudo service openvpnas start
After that, OpenVPN was up and running again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.