Antrax 0 Posted ... Hi all I'm on Xubuntu 14.04 and, since that I wanted to start a connection to AirVPN servers at startup without loading GUI, I added the instruction from command-line ("sudo /usr/bin/airvpn -cli -netlock") in Session and "Startup->Application autostart" (something like said in this post https://airvpn.org/topic/12797-from-windows-7-to-linux-problem/#entry22035). It is working. The problem is that I can't disconnect from the VPN and it's impossible to press x key or Ctrl+C in the terminal because it doesn't load at startup launching the application in this way. I've tried sudo killall openvpn and it actually disconnects from VPN, but after a few seconds I find myself connected to VPN again (the only way is to remove the instruction from Session and "Startup->Application autostart" and reboot). Is there a solution that doesn't require rebooting? Thanks. Quote Share this post Link to post
Opayq 1 Posted ... Did you ever find a solution? I'm on Lubuntu 14.04 and notice the same behaviour. With sudo killall airvpn and sudo killall openvpn I'm unable to close AirVPN running in command line mode. A new openvpn instance is opened immediately... Quote Share this post Link to post
milkaca 1 Posted ... This is what I do and it is working: # Kill OpenVPN by sending Ctrl + c to the process sudo pkill -f -SIGINT openvpn sudo pkill -f -SIGTERM openvpn # Kill airVPN process by sending Ctrl + c to the process sudo pkill -f -SIGINT airvpn sudo pkill -f -SIGTERM airvpn echo "# Stopping VPN" sudo iptables -P INPUT ACCEPT sudo iptables -P FORWARD ACCEPT sudo iptables -P OUTPUT ACCEPT sudo iptables -t nat -F sudo iptables -t mangle -F sudo iptables -F sudo iptables -X sudo iptables -t raw -F sudo iptables -t raw -X echo "# Restarting network interfaces" sudo ifdown etho sudo ifup eth0 sudo ifdown wlan0 sudo ifup wlan0 Quote Share this post Link to post
Opayq 1 Posted ... Thanks a lot! Finally able to quit In my case I had to use ifconfig eth0 down instead of ifdown eth0.Seems to be a typo in your script (etho instead of eth0). What do the iptables rules do exactly? Do I need them? Quote Share this post Link to post
milkaca 1 Posted ... Yes it is a typo. I have no ide why did I put iptables there, it has been a long time ago since I made it. I am using network lock, so that is probably the reason, to reset rules and alow normal trafic again. Quote Share this post Link to post