Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello all. We're trying to determine which ports are open on a specialized piece of hardware in our lab. We have Red Hat 5.9 as the host to scan it and have tried the following nmap commands:
nmap -v -sU -p U:1-65535 <ip address>
This doesn't have the desired effect and, from reading how this actually works under the hood, since the OS considers this a ping sweep (kind of), it responds with, "Not gonna do it", yet it will tell you how many ports were found opened. I believe they mentioned the OS as having a built-in failsafe to thwart would-be attacks in this manner.
What's interesting about this is that if you shorten the range of ports to, say, 100 or so, apparently the OS doesn't mind and will actually tell you the port(s) opened and the protocol associated with it.
So, my question is, how does one determine all opened UDP ports on a host without the OS getting in the way?
For me it works. The exact message you get after this command is really "Not gonna do it"? It should display a reason why command was unsuccessful. Are you running this command with root privilages?
Yes, run as root (or you'd get the message that it fails immediately because it requires root, of course).
When I do the entire port range, it tells me there were x number of ports opened, but it doesn't give me the rundown I'm expecting to see that includes the typical port and protocol columns.
Starting Nmap 6.40 ( http://nmap.org ) at 2013-09-13 11:29 CEST
Initiating UDP Scan at 11:29
Scanning localhost (127.0.0.1) [65535 ports]
Discovered open port 123/udp on 127.0.0.1
Discovered open port 137/udp on 127.0.0.1
Completed UDP Scan at 11:29, 2.39s elapsed (65535 total ports)
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000080s latency).
Not shown: 65530 closed ports
PORT STATE SERVICE
123/udp open ntp
137/udp open netbios-ns
138/udp open|filtered netbios-dgm
5353/udp open|filtered zeroconf
39735/udp open|filtered unknown
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 2.46 seconds
Raw packets sent: 65538 (1.836MB) | Rcvd: 131072 (5.508MB)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.