Quantcast
Channel: Security Tools – Security List Network™
Viewing all articles
Browse latest Browse all 443

python scripts that creates an outgoing-incoming ssh tunnel that can bypass some firewalls.

$
0
0

python scripts that creates an outgoing-incoming ssh tunnel that can bypass some firewalls.
Sometimes you want to access a system that is behind a firewall or NAT and you can’t open a port on them. With this kind of tunnel you can make it “call home” and wait for your connection on your local computer or somewhere else.

autossh

autossh

This is what you get:

+----------------+          +-----+   +---------------+          +-------------+
|                |          |     |   |               |          |             |
|                >------------------------------------------------>            |
|        <-----------------------------------------------------------+         |
|                >------------------------------------------------>  |  SSH    |
|  Remote site   |          |     |   |               |          |   |  Server |
|                |          |  F  |   |            +-----------------+         |
|                |          |  i  |   |            |  |          |             |
|                |          |  r  |   |  Internet  |  |          +-------------+
+----------------+          |  e  |   |            |  |
                            |  w  |   |            |  |
                            |  a  |   |            |  |          +--------------+
                            |  l  |   |            |  |          |              |
                            |  l  |   |            +-----------------< You      |
                            |     |   |               |          |              |
                            +-----+   +---------------+          +--------------+

You access a remote site bypassing a firewall with the help of a SSH server. You can see the tunnel going out from the remote site to the SSH server and how your connection can get there through it. From the firewall point of view there is just an output SSH connection. Most firewalls will allow it. The firewall can’t see there is an incomming connection hidden inside it.

Usage:

git clone https://github.com/aalku/ssh-tunnel && cd ssh-tunnel
python autossh.py -h (for print helper)

python autossh.py -tp 22 -sh -lp -su -sq "$@" >> /var/log/autossh.log 2>&1 &

Source : https://github.com/aalku/


Viewing all articles
Browse latest Browse all 443

Trending Articles