How to Bypass an Internet Firewall
Firewalls are often meant to protect users, but in the end make using some parts of the Internet a hassle. A common method of circumventing a firewall, yet maintaining network security, is to use the local port forwarding option of SSH (Secure Shell) to create an encrypted network tunnel. Since most firewalls allow SSH traffic, this allows an inside user to tunnel his way out of restrictive firewalls by bouncing his traffic off a remote SSH server. It's a great way to secure your connections when using unencrypted Web services from public computers as well.
Instructions
-
Windows
-
1
Download the free SSH client PuTTY and run the application.
-
2
Type in the connection details for the Host Name and Port fields, then make sure that the "SSH" option is selected for the Protocol section. The default port for SSH is 22.
-
-
3
Click "Connection," then "SSH," and finally "Tunnels." Type in the source port you will be connecting through on the machine you are using. This can be anything above 1024 and below 49152, as those are reserved by most systems.
-
4
Type in the destination machine and port. For example, if you wanted to connect to Ubuntu.com, you would enter "ubuntu.com:80." Port 80 is the default port for all Web traffic. Click "Add" to create the tunnel.
-
5
Click "Open" to create the session. Type in your login details when requested.
-
6
Connect to the tunnel using the host "localhost:localport" where "localport" is the port you chose as the source port before. For example, if you chose port 8080, and had the destination machine and port set up per the "ubuntu.com:80" example, opening your Web browser and navigating to "http://localhost:8080" would bring up Ubuntu.com.
Linux or Mac OS X
-
7
Open a Terminal window and confirm that SSH is installed by typing "ssh" and pressing "Enter." If it is not installed, download and install OpenSSH before continuing.
-
8
Type "ssh -L L-port:d-host:d-port r-host" and press "Enter." L-port should be replaced with the local port you will use on the machine you are connecting from, d-host and d-port with the destination host and port, and r-host with the address of the SSH server you are creating a tunnel through.
-
9
Enter your authentication details when the remote SSH server requests them.
-
10
Open your browser or another application, depending on the service you forwarded, and connect to "localhost:L-port" where L-port is the local port from before. For example, if you chose port 8080, and had the destination machine and port set up to "ubuntu.com:80," opening your Web browser and navigating to "http://localhost:8080" would bring up Ubuntu.com.
-
1
Tips & Warnings
Do not circumvent a corporate, educational or any other kind of firewall without permission.