I have a server at a remote location, which is on two subnets (i.e. it has two network interface cards NIC1 and NIC2, A is on e.g., B is on I can ssh in via A, which is outward facing.

How can I access resources in the subnet B from my home computer. E.g. I would like to access the switching hub of subnet B via its browser interface (

All machines are running Ubuntu 18.04.

I do not want to set up a VPN server on the remote machine (for security reasons). I would prefer to do everything over my existing SSH tunnel.

I know that I have previously been able to create a tun interface on my local (home) computer via ssh, using sshuttle:

sshuttle -r user@remoteserver -vv --dns

However, this will direct my HTTP and HTTPS requests through the "normal" gateway of the remote server (I.e. I will access the internet normally with my IP showing up as the server's IP).

I want to go via the subnet B (to access via browser the switching hub's network interface).

Is there a direct way to do this or do I need to go about this in a different way?


I was able to actually get this working using the original idea I had, with one trick: I had to enable ufw on my local machine. Otherwise sshuttle was erroring out.

So, on local machine, I did:

sudo ufw enable


sshuttle -r username@ipForSubnetA -vv --dns

This actually (scarily?) allowed me to on my local machine access elements of subnet B.

The remote machine is quite locked down firewall-wise, only allowing SSH access via private key over one port.

If anyone knows any insecurities in sshuttle please feel free to tell me :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.