Questions tagged [tunnel]

Tunneling is the act of encapsulating one protocol inside another.

713 questions
482
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…
Mala
  • 7,466
159
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…
user1114
  • 1,671
130
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
120
votes
11 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…
heavyd
  • 65,321
103
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…
Brian Lacy
  • 3,391
53
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…
41
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…
Berry
  • 531
41
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)…
Andy
  • 1,674
30
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…
29
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…
TCZ
  • 453
27
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…
cokedude
  • 449
27
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…
Juha
  • 661
24
votes
6 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…
24
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…
abbood
  • 1,354
22
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…
pnongrata
  • 2,982
1
2 3
47 48