I have a local network containing a machine named black
running Ubuntu 16 server, and a raspberry pi. The pi has two network cards. One faces this local network, and the other connects to my ISP via a router. black
has one interfaces which faces this network. The pi runs an ssh server configured out of the box.
I want to use sshuttle (or something else like it) to provide black
with internet connectivity.
This is run before sshuttle is invoked:
username@black:~$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp2s0
iface enp2s0 inet static
address 192.168.0.11
netmask 255.255.255.0
username@black:~$ ip route
192.168.0.0/24 dev enp2s0 proto kernel scope link src 192.168.0.11
username@black:~$ ping 8.8.8.8
connect: Network is unreachable
I then run sshuttle like so:
username@black:~$ sshuttle -r [email protected] 0.0.0.0/0
[email protected]'s password:
-c:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
client: Connected.
In a different terminal, I then run this:
username@black:~$ ip route
192.168.0.0/24 dev enp2s0 proto kernel scope link src 192.168.0.11
username@black:~$ ping 8.8.8.8
connect: Network is unreachable
How can I make this work so that sending pings to ips outside of my local network works once connected with sshuttle? For various reasons, it has to be an ssh tunnel, but is there something other than sshuttle?