Bypassing Firewalls using NMAP

Gupta Bless
5 min readJul 1, 2023


Nmap, which stands for network mapper, is an open-source, powerful utility used by security professionals to identify valuable information or infrastructure weaknesses. Its primary function is to perform host and service discovery on a computer network. Nmap operates on the majority of operating systems and transmits the crafted packet to the target; after receiving a response, it begins its analysis and determines which ports are open or closed. Therefore, if a researcher or an attacker executes it and identifies any open suspicious ports, they can begin further analysis or exploitation. In addition to host discovery and port scanning, it is also capable of service identification and version detection. With the aid of this instrument, network audits can be performed with relative ease. As it operates on hosts or targets, it identifies open ports. For this purpose, it employs a number of methods. Let’s examine a few of them. But before we can proceed, we need a foundational understanding of the firewall. A firewall is a security device used to filter traffic, primarily on the basis of port. Therefore, if a port is open on the firewall for a particular IP address, the user can access the resources without restriction. However, if the port is closed and the user still wishes to access the resources, he or she can use these nmap techniques to gain unauthorized access. However, if an organization has a tightly secured infrastructure, it is not possible to bypass them.

Technique to bypass Firewall


Through a technique known as spoofing, an attacker can make a packet appear to have originated from a different network interface than the one from which it was actually sent. Just like showing that this packet has been sent from their internal network. By modifying the “IDLE/IPID header” in the packet, which is accessible via Nmap, we may fabricate the source address. After it was completed, it looked like the packet had come from somewhere else.

The nmap command looks like:

sudo nmap -sS -v — spoof=<spoofed_ip_address> <target_ip_address>

In Linux, the sudo command is used whenever a command requires root access, which is most of the time because nmap commands require…



Gupta Bless

Security enthusiast working to secure web for others.