how to quit sshuttle and get system networking back to normal in VBox
I love sshuttle. My new fav toy. But...when i run from the command line and I use ctl-c to quit....my networking is screwed and I have to restart the VM. Using 12.04
Here is how i start from the command line to divert all traffic to a ec2 isntances using a ssh config file.
ubuntu@ubuntu:~$ sshuttle -r ec2-fff-fff-fff-fff.us-west-2.compute.amazonaws.com 0/0
./ssh/config
Host *compute.amazonaws.com
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
User ubuntu
IdentityFile /home/ubuntu/.ec2/aws_development_oregon.pem
now...in the terminal...I use ctrl-c to kill the tunnel. But...how to a failsafe reset from the command line without having to restart the VBox?
Thanks
Solution 1:
Find the PID of sshuttle using the pgrep
command:
pgrep sshuttle
and terminate it using the kill
command:
kill -15 <PID>
If you have only one instance of sshuttle running and no other program containing sshuttle
in its name, you can use:
pkill -15 sshuttle
To terminate the process.
Restart the networking
service specific to you Linux distribution (sudo systemctl restart networking
on Ubuntu).
Please note that a saner way of dealing with starting/stopping/restarting daemons would be to create a service file (link specific to sshuttle).