nmap / nmap/nmap

nping does not support --source-addr in udp unprivileged mode

Open
#2,027 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Nping
Dominant language
C
Stars
13.6k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

If I run:

nping --udp --dest-port 50000 --dest-ip 232.1.3.100 --source-ip 127.0.0.1

I get the error message:

Mode UDP requires root privileges

This error message is somewhat misleading, but it seems to be due to the "--source-ip" parameter.

However, there is no reason this should not work, nping could just bind the socket to 127.0.0.1.

Netcat was able to do this with something like "echo Hello | nc -s 127.0.0.1 -u 232.1.3.100 50000"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the nping command in the issue and locating the UDP handling for the --source-ip option. Check how the source address is applied in unprivileged mode; done means the command can bind to 127.0.0.1 without requiring root, with an accurate error when it cannot.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.