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?
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.
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.
Tunneling is a way to move packets from one network to another. Tunneling works via encapsulation: wrapping a packet inside another packet.
The most common VPN tunneling protocols include PPTP, L2TP/IPsec, OpenVPN and SSTP.
Well, basically you have 3 machines:
Basic tunnel would be any communication on port X of A gets forwarded to port Y of C by B. I.e. instead of A → C you have A → B → C. 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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With