Tunneling is the act of encapsulating one protocol inside another.
Questions tagged [tunnel]
683 questions
469
votes
18 answers
An SSH tunnel via multiple hops
Tunneling data over SSH is pretty straight-forward:
ssh -D9999 username@example.com
sets up port 9999 on your localhost as a tunnel to example.com, but I have a more specific need:
I am working locally on localhost
host1 is accessible to…
![](../../users/profiles/10146.webp)
Mala
- 7,288
- 11
- 35
- 38
155
votes
7 answers
How can I tunnel all of my network traffic through SSH?
Whenever I'm using the internet from an insecure location (such as public wifi) I like to use an ssh tunnel (ssh -D port host) to ensure my traffic can't be sniffed. Unfortunately, there seem to be many applications which do not provide a way to…
![](../../users/profiles/7301.webp)
Jeremy
- 1
- 5
- 17
- 44
128
votes
8 answers
Forward SSH traffic through a middle machine
SSH tunneling is very confusing to me. I am wondering if I can do this in Linux.
I have 3 machines..
A. My local machine at home.
B. Machine at work that I can SSH into (middle man).
C. My desktop at work that I can only SSH into from machine…
PKKid
97
votes
9 answers
UDP traffic through SSH tunnel
The title pretty much sums it up. I would like to send UDP traffic through a SSH tunnel. Specifically, I need to be able to send UDP packets through the tunnel and have the server be able to send them back to me on the other side. I know how to…
![](../../users/profiles/820.webp)
heavyd
- 62,847
- 18
- 155
- 177
92
votes
5 answers
OpenVPN: Only route a specific IP addresses through VPN?
On a remote private network there are two servers -- a file server and a database server (these are both Win machines, in case it matters).
The file server has its own fairly robust authentication mechanisms, and allows me to connect directly from a…
![](../../users/profiles/31965.webp)
Brian Lacy
- 3,211
- 3
- 25
- 23
52
votes
3 answers
Why is a tunnel called a "tunnel"?
I don't understand why is the "tunnel" metaphor used to describe a networking tunnel.
At first I thought the reason was because the data sent is encrypted, and so an eavesdropper will not be able to see the data (he sees the data wrapped in a…
![](../../users/profiles/709040.webp)
user7681202
- 561
- 1
- 4
- 9
40
votes
4 answers
How to mount remote SSHFS via intermediate machine? Tunneling?
I would like to mount a remote file system (A) using SSHFS, but sometimes I have IP address, access from which is not allowed. So my plan is to access it via another machine (B) in that network. Do I need to mount A on B and then to mount B (and A)…
![](../../users/profiles/13706.webp)
Andrei
- 1,554
- 5
- 19
- 28
36
votes
5 answers
SSH Reverse socks tunnel
ssh -D can make a socks port at local machine, which pass the traffic to the remote, then to other places.
ssh -L port:host:hostport, listen port at local machine, pass the traffic to "host:hostport" from the point of view of the remote machine.
ssh…
![](../../users/profiles/109350.webp)
Berry
- 471
- 1
- 5
- 5
28
votes
1 answer
Why can I not connect to a reverse SSH tunnel port remotely, even with GatewayPorts enabled?
I require constant SSH access to a host in our department, whose IP address is dynamically allocated. I've set up a remote SSH tunnel from the target host to one of our hosts that does posess a static ip address:
ssh -f -N -g -R :22223:localhost:22…
![](../../users/profiles/123764.webp)
James Paul Turner
- 418
- 1
- 4
- 6
28
votes
1 answer
How to release ports on the SSH server when a reverse ssh tunnel disconnects abruptly/uncleanly?
We have a some hardware we install at our customers' locations, that hardware connects to our ssh server and establishes a reverse ssh tunnel so we can gain access to several client systems for monitoring purposes.
Everything works fine until there…
![](../../users/profiles/315815.webp)
TCZ
- 443
- 1
- 5
- 8
24
votes
2 answers
Chrome ssh tunnel forwarding
I am first logging into an ssh server. Then I am trying to use Chrome for ssh tunnel forwarding. Is there a gui way of doing this? I can do this in Firefox's gui in like 10 seconds so I would think Chrome would also have this useful feature. Is…
![](../../users/profiles/93715.webp)
cokedude
- 419
- 1
- 4
- 9
22
votes
4 answers
Is it possible to tunnel https traffic via ssh tunnel with standard ssh-programs?
Can I reroute the https traffic (of an svn repository) via ssh-tunnel.
The problem is that the the services that use https don't work if I just create one tunnel for listening with e.g.:
ssh -L 12345:server.com:443 localhost
Do I have to do…
![](../../users/profiles/60061.webp)
Juha
- 511
- 2
- 7
- 14
21
votes
2 answers
how to run a tunnel in the background as part of a shell script
I run these two commands all the time to connect to my rds instance on aws that's protected behind a firewall (so i tunnel through the ec2 instance) like so:
command 1: open the tunnel (run on background)
ssh -N -L port:host:5432 user@$ip -i…
![](../../users/profiles/234141.webp)
abbood
- 1,214
- 4
- 16
- 29
20
votes
4 answers
VPN Tunnel vs SSH Tunnel
What is the difference between a tunnel, a VPN tunnel and an SSH tunnel? According to Wikipedia, "tunneling" is:
Tunneling typically contrasts with a layered protocol model such as those of OSI or TCP/IP. The delivery protocol usually (but not…
![](../../users/profiles/98499.webp)
pnongrata
- 2,782
- 17
- 51
- 82
19
votes
5 answers
Bluetooth over IP?
It seems to be possible to run USB over IP, e.g. using usbip which is part of some Linux distros e.g. https://www.archlinux.org/packages/?q=usbip
Is there something similar for Bluetooth over IP? (NOT: IP over Bluetooth).
This would allow the…
![](../../users/profiles/98013.webp)
Johannes Ernst
- 1,237
- 4
- 18
- 37