How do you specify a source port with -g or --source-port, and why might it be useful?

Study for the Nmap/ZenMap Switches Test. Prepare with flashcards and multiple choice questions, each question provides hints and explanations. Get ready for your exam!

Multiple Choice

How do you specify a source port with -g or --source-port, and why might it be useful?

Explanation:
Setting a source port with -g or --source-port defines the port number that the scanning packets appear to come from. This matters because many networks and security devices filter or treat traffic differently based on the source port. By choosing a specific, allowed, or commonly permitted port, you can increase the chances that probes are accepted or that you can observe how the target responds to traffic from that port. It’s also useful for testing firewall rules, IDS/IPS behavior, or alignment with a network policy that restricts traffic to certain source ports. The other options describe things like destination host, scanning rate, or protocol selection, which aren’t controlled by this flag.

Setting a source port with -g or --source-port defines the port number that the scanning packets appear to come from. This matters because many networks and security devices filter or treat traffic differently based on the source port. By choosing a specific, allowed, or commonly permitted port, you can increase the chances that probes are accepted or that you can observe how the target responds to traffic from that port. It’s also useful for testing firewall rules, IDS/IPS behavior, or alignment with a network policy that restricts traffic to certain source ports. The other options describe things like destination host, scanning rate, or protocol selection, which aren’t controlled by this flag.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy