Reverse Connection for Bypassing The Firewall

If you use reverse connection you can also bypass Hardware Firewalls. The reverse connection is nothing more than the target server connect to the client instead of the client connect to the target server:

Client:20 <——- Target Server:30

Target Server:30 ——–> Client:20

A bi-directional connection between 2 sides has been established. Normally Hardware firewalls only filter/block the outbond traffic meaning that if a computer outside a LAN tries to connect to a computer inside a LAN that is behind a Router/Hardware Firewall it will run into errors like couldn´t connect to the remote computer and so on.

You must notice that this method will only work if the IP address of the computer behind a router is not restricted to access the internet. If only some ports were blocked in the firewall rule, then this method is better than IP spoof since it doesn´t change anything just creates a ‘tunnel’. It is also good to use this when a specific website or keyword to a service or website were used in the Firewall restriction or when you don´t have access to the Firewall Configuration and eventually want that someone outside the LAN access some service of the computer inside the LAN There are tools that creates a tunnel between the target server and the client. These are the TCP/UDP port redirector. A nice GUI (grphical user interface) tool is “WinIPRelay”. get it at http://voodootechs.com and open it.

Click the button “ADD RELAY”

In the field “Local Port” type the port of the local computer you want to use in the connection. Make sure it is not blocked or alredy being used. In the field “Remote Host” type the IP address or if it is a website type the URL

In the field “Remote Port” type the port of the remote computer that will be connecting to you. eg: if it´s a website then the port will usually be 80. if it is a service like Telnet the port is 23. If the remote computer wants to access a service on your computer (the one behind a LAN) then the remote port must be previously setup there, on the remote computer and then you type it in this field. In the field “Connection Timeout” type a numerical value to set the time in seconds that the connection will keep established.

Click OK.

Supposing the service you wanted to access is a website eg: www.msn.com and the local port u chose is 40 then you just open up your internet browser and type: 127.0.0.1:40 and the msn.com webpage will be displayed. Notice that the port 40 must not be blocked.

Now suppose you want your friend to access your telnet server on port 23. If he tries direct connection he won´t be able to connect, so he must open a port on his/her computer and start to listen for connections. Suppose the chosen port was 55 and his IP address is 33.33.33.33 open “WinIPRelay” and set the local port to 23, Remote host to 33.33.33.33 , remote port to 55 and Connection timeout to 999. if he open his command prompt and type: telnet 127.0.0.1 55 he will reverse connect to your telnet server.

HTTP Tunnel –> bi-directional/reverse connection between 2 hosts using port 80 on the computer behind the LAN and using only HTTP requests when establishing the connections.

Amol Wagh

Author is a Tech blogger & loves to share his work on web by writing guidelines for Ethical Hacking students & Security professionals. Performing various types of hacking from pen test to smartphone hacking – He enjoys hacking just for personal research purpose.

Working with more of ‘grey as well as black hat’ hackers for learning advanced hacking as well as defending techniques & share them with learners. His prime area of research is Cyber Criminals & currently working on a Video Product Development to teach hacking & Pen Testing for absolute beginners.