Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is tunnelling (ssh tunneling and ppp tunneling)

Tags:

networking

what is tunnelling (ssh tunneling and ppp tunneling)? I searched in google but it is confusing.. can anyone provide some good material on this tunneling topic?

like image 714
suresh Avatar asked Mar 30 '09 08:03

suresh


People also ask

What is Tunnelling SSH?

SSH tunneling, or SSH port forwarding, is a method of transporting arbitrary data over an encrypted SSH connection. SSH tunnels allow connections made to a local port (that is, to a port on your own desktop) to be forwarded to a remote machine via a secure channel.

What is the difference between SSH and SSH tunneling?

The SSH connection is used by the application to connect to the application server. With tunneling enabled, the application contacts to a port on the local host that the SSH client listens on. The SSH client then forwards the application over its encrypted tunnel to the server.

What do you mean by tunneling?

Tunneling is a way to move packets from one network to another. Tunneling works via encapsulation: wrapping a packet inside another packet.

What are the four main tunneling protocols?

The most common VPN tunneling protocols include PPTP, L2TP/IPsec, OpenVPN and SSTP.


1 Answers

Well, basically you have 3 machines:

  • A your machine
  • B server
  • C remote machine

Basic tunnel would be any communication on port X of A gets forwarded to port Y of C by B. I.e. instead of AC you have ABC. So to the machine C it seems that communications is coming from B, not A. Useful if C's firewall doesn't allow connection from A (e.g. territory restricted). So for example with:

ssh -L8080:www.example.com:80 your.server

Accessing localhost:8080 from your machine you're actually accessing www.example.com:80 from your.server.


Other type of tunnel would be:

  • A machine in local net
  • B server

You open port X on server B, any communication on that port gets forwarded to port Y on local machine A. Useful if you're behind NAT/firewall. For example:

ssh -R8080:192.168.1.1:80 your.server

Anyone accessing to your.server:8080 is actually accessing 192.168.1.1:80 in your local net.

like image 147
vartec Avatar answered Nov 10 '22 07:11

vartec