OpenVPN / openvpn-gui

OpenVPN GUI is a graphical frontend for OpenVPN running on Windows 7 / 8 / 10. It creates an icon in the notification area from which you can control OpenVPN to start/stop your VPN tunnels, view the log and do other useful things.
Other
1.38k stars 397 forks source link

"Could not parse --management option" when using config-auto folder. #656

Closed Samg381 closed 9 months ago

Samg381 commented 9 months ago

When moving my working OpenVPN config + certificates from the config to the config-auto folder, I receive the following error after clicking connect:

Screenshot_8

This should function no differently than it does in the config folder, with the only difference being connection at system startup.

cron2 commented 9 months ago

If you want to access configs in auto from the GUI, they need to have a management statement in them - otherwise the GUI won't know where to find them.

For normal "started by GUI", the GUI will setup management when running openvpn, but for auto the ordering is different so the config also need to be different (iff you want GUI access). For many users the whole point of having the config in auto is "no clicking, no GUI", though.

Samg381 commented 9 months ago

Thanks for getting back. Could you elaborate on the management statement? Should I simply place that in the configuration, or is more configuration required?

I am trying to have my OpenVPN GUI connect to my server automatically when the system boots up. I like the taskbar icon, as it allows me to easily disconnect if I need to, along with letting me know the connection is active. If I add the management statement, will that achieve my goal?

cron2 commented 9 months ago

Adding management 127.0.0.1 41000 should be sufficient ("listen on localhost, Port number 41000"). If that port is used by something else - "any random number between 1024 and 65535" will do the job.

For added security (so "no random process" can connect to the management interface and interfere) a password can be set - which needs to go to a file ("just one line with a password") which is then referenced as management 127.0.0.1 41000 mysecret.txt. If no path is specified, I assume that "putting it into the config-auto directory will be the place where it is looked for.

(I'm not the resident expert on this, @selvanair is, but I think I got this right ;-) )

Samg381 commented 9 months ago

That did the trick! Thanks a ton!