Closed HonamSong closed 1 year ago
@HonamSong
Getting the Management Interface (MI) setup is something that can trip people up. The first thing you need to do is get the OpenVPN directive for enabling the MI into your server.conf file.
The easiest way to do that is to use Configuration - OpenVPN Config in the WebUI. You need to run through this once in full to get the database setup with your specific values. Many of the default values will be correct, but be sure to update the ones that aren't. Changes are made behind-the-scenes to the way the log file is configured here too.
For a typical installation the Management directive should be set to 172.17.0.1 2080 (note the colon is not used here). This is the address of the default docker gateway, and is the most secure way to communicate between the docker-based WebUI, and a host-based installation of OpenVPN.
Once that's done, and OpenVPN has been restarted or the host server rebooted, you can then update Configuration - Settings with 172.17.0.1:2080, to communicate with OpenVPN via that same default docker gateway.
@HonamSong
Also, thanks for pointing out the panic.go when using a hostname.domain in this field. Docker can be unreliable resolving hostnames for the host network, which is probably why I rarely test with them -- but we certainly want field data to be gracefully handled. So, I'll put some proper error handling in there.
See my previous comment for how to get things going using the default Docker gateway IP as the address for the Management Interface.
@HonamSong
Getting the Management Interface (MI) setup is something that can trip people up. The first thing you need to do is get the OpenVPN directive for enabling the MI into your server.conf file.
The easiest way to do that is to use Configuration - OpenVPN Config in the WebUI. You need to run through this once in full to get the database setup with your specific values. Many of the default values will be correct, but be sure to update the ones that aren't. Changes are made behind-the-scenes to the way the log file is configured here too.
For a typical installation the Management directive should be set to 172.17.0.1 2080 (note the colon is not used here). This is the address of the default docker gateway, and is the most secure way to communicate between the docker-based WebUI, and a host-based installation of OpenVPN.
Once that's done, and OpenVPN has been restarted or the host server rebooted, you can then update Configuration - Settings with 172.17.0.1:2080, to communicate with OpenVPN via that same default docker gateway.
@bnhf Thank you for your confirmation.
But, My problem is below.
Appears normally if the client is not connected.
But, 500Error Return when client connects
And, pivpn-tap-web-ui process log is below.
If the client disconnects, the screen will display normally within a few seconds.
My configuration server.conf => 172.17.0.1 2080 and MI setup config => 172.17.0.1:2080
Do you understand my problem? Is there something I'm missing?
@HonamSong
The answer is right in your screenshot of the Status page. OpenVPN 2.5.x or higher is required for this WebUI, and you are using 2.4.7:
There are several ways to upgrade OpenVPN if the repository used by your distro installs 2.4.7. You may be able to do it through backports, or check the OpenVPN website for information on your options. 2.5.x includes many enhancements and is well worth installing. 2.6.x is out now too, though I haven't had a chance to test it.
@bnhf OK! Thank you so mach! I`ll try Change the version and test.
@bnhf After changing the version it displays fine. Thank you so much for your help.
Hi! hnhf
If you change the Management Address in the Settings field, an error occurs as shown below. There is an address that can be connected normally.