jochenwierum / openvpn-manager

An OpenVPN Frontend
https://github.com/jochenwierum/openvpn-manager/wiki
GNU General Public License v2.0
152 stars 55 forks source link

Second config is clicked but connects to first config #17

Closed phil-davis closed 8 years ago

phil-davis commented 11 years ago

When I select to connect to the 2nd config, the window shows the correct selected config, but the first config is actually connected to. Running Windows7, OpenVPN Manager 0.0.3.8 Anyone else experiencing this? openvpn-manager-problem

phil-davis commented 11 years ago

And I just had a instance where I selected the 1st config to connect, but in actual fact it connected me to the 2nd config.

luckyjay commented 11 years ago

Yes, this is probably because they both have the same management port in the OpenVPN config file. I just battled this same issue myself.

phil-davis commented 11 years ago

By "management port" I assume you mean "server listening port". Our OpenVPN road-warrior server uses the same port number to listen on at every office. We picked a different server listening port number to the default, but used that at every office to make it easy to remember! I will do some testing using a different server listening port number at each office - that would be a workaround. But it would be nice if the code new exactly which connection the user client had selected, and actually used the corresponding config file to make the connection.

luckyjay commented 11 years ago

Ah, sorry I wasn't clear. I'm not referring to anything on the server-side. There is a client config option, for example:

# open management channel
management 127.0.0.1 166

That "166" is the local port that the management interface will use. If all your client-side configs have the same port...disaster strikes. Change them all to be different.

Also, if you ever intend to start more than one connection at a time, you will also need to add the "nobind" config option on the client side.

Hope that helps.

phil-davis commented 11 years ago

OK - I see that line in the conf file generated by pfSense, exactly as you quoted. I will try and do some testing overnight, putting different numbers there in each config.

hapm commented 8 years ago

This is caused by missconfiguration, the best we can do is to warn the user if this happens, so it can be fixed in the openvpn config file as suggested in #36 .