furlongm / openvpn-monitor

openvpn-monitor is a web based OpenVPN monitor, that shows current connection information, such as users, location and data transferred.
http://openvpn-monitor.openbytes.ie
GNU General Public License v3.0
968 stars 294 forks source link

It doesnt connects to the local open vpn server on 127.0.0.1 #224

Open sajiljosephs opened 3 years ago

sajiljosephs commented 3 years ago

WARNING: socket error: [Errno 99] Cannot assign requested address Could not connect to localhost:5555 (Cannot assign requested address)

But when installed via source, it automatically connects to the openvpn server

sajiljosephs commented 3 years ago

This is while setting up via docker

brinza888 commented 1 year ago

If you are setting up this tool using Docker, you need to work with container networking, because containers are isolated and localhost inside container is container's localhost, not host machine.

The simplest way to avoid this, is to run docker in "host" network mode (see --network host in Docker docs).

Another way is to use --add-host=host.docker.internal:host-gateway parameter to provide special hostname "host.docker.internal" inside the container, that will be routed to your host machine. In this case don't forget to add allow rule in firewall and make OpenVPN Management interface listen on Docker network.