Bypassing Port Scan Protection

Using TOR to Bypass Port Scan Blocking Protection Firewalls.

This guide will help you bypass port scan blocking firewalls using the dark web, TOR.

The Linux distro we are using is Kali Linux.

If you prefer video format, please check out the video links at the top or our YouTube channel.

Step 1: Download the GitHub Repo

Open your linux terminal, install git with sudo apt install git. Then, download the code by using git clone

Step 2: Install the Requirements

Once the GitHub Repo is downloaded, you need to ensure any prerequisites are installed.

  1. Change directory to the downloaded tor_port_scan directory by entering cd tor_port_scan
  2. Install TOR by entering sudo apt install tor
  3. You may need to uncommect ControlPort 9051 from the file /etc/tor/torrc by removing the # from #ControlPort 9051TOR configuratin file
  4. Enter sudo systemctl restart tor, then sudo systemctl start tor
  5. Ensure pip and python3 is installed, and enter python3 install -r requirements.txt

Step 3: Script Parameters

Now the requirements are installed, the TOR port scan python script is ready to run. However, first lets check what parameters can be passed to the script.

  1. python3 -h will bring up the usage menu. scan usage documentation
  2. python3 [target] will execute a port scan changing the TOR address every 5 ports.TOR port scan in use
  3. You can use the --tor-interval [n] flag to change the number of ports scanned before the TOR IP address is changed. For example, python3 python3 --tor-interval 10 [target]
  4. The timeout -t flag can be used to enter the TIMEOUT seconds to wait before connection timeout for each port.
  5. The jobs -j flag can be used to set the maximum number of open connections at the same time.

Now that you know port scan blocking can be bypassed, lets see what we can find with an external pen test.