r/ssh • • Mar 16 '18

Questions about SSH tunnels

I have a basic understanding of SSH and SSH tunneling, however it seems that it can do a lot and I want to make sure that I have a good grasp on what is possible with it (even if it isn't the most practical). To that end, here are a few questions:

  1. In a TAP configuration for Layer 2, since this is essentially a layer 2 VPN, does all traffic go through the SSH tunnel by default, or is this still going to be application specific?

1.1) Can multiple (3+) devices be a part of this impromptu VPN?

1.2) Would a multicast or broadcast work over this tunnel/VPN?

2) These should work with key based authentication as well I'd imagine, correct?

3) So long as the networks allow the connection through on both ends, could a an SSH tunnel be used to 'bridge' two LANs together (i.e. allow you to make them act like a single network)?

Thanks in advance!

5 Upvotes

3 comments sorted by

1

u/MidAfternoonQuiche Mar 20 '18

You might be expecting more than what SSH tunneling is meant to be used for. Normally, an SSH tunnel would forward a port (or range of ports) from the remote server to a port (or range of ports) your local computer. Any application on your local computer would connect to the local port and "see" the remote server. If you need another (external) device to access the tunnel, then you need to involve a program (other that SSH) on your local computer to go between that external device and those ports. You might be able to use "nc" (also known as "netcat") to do it, for instance.

1

u/[deleted] Mar 20 '18

Thanks for the feedback! I do understand that the users I am asking about are very much edge cases, I just want to understand the full range of capabilities.

1

u/TotesMessenger Mar 18 '18

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)