How to start/stop OpenVPN client from command line

Hi,

I have import the client.ovpn file, and work perfectly will I activate the connection by clicking the connect button.

But I wonder how I can start and stop the connection from command line, I tried to run the full command that is shown in “ps” command it does not work.

Anybody knows the trick?

it is simple

openvpn /etc/openvpn/xxxxxx.ovpn

This starts the vpn but not necessary fix firewall rules. You still need to change firewall in order to route correctly.

I did notice using
/etc/init.d/startvpn restart

doesnt work anymore – seems to get hung up

It should work. Did you modify your ovpn manually? there should be a line

daemon

Found the bug in startvpn. Does not like spaces in the ovpn file names. Added a fix to the tracker:

I think this should be fixed already. Maybe you are using an old version?

Pls specify your model and version.

I am on 3.013 on 300M. I just verified by unpacking the tar image from http://download.gl-inet.com.s3.amazonaws.com/firmware/ar300m/nand/testing/gl-ar300m-3.013-0128.tar the bug is present there.

Got it. Thanks. We will check.

This should be fixed already.