LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-12-2013, 06:48 AM   #1
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Blog Entries: 4

Rep: Reputation: Disabled
nmap - find open UDP ports


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?
 
Old 09-12-2013, 10:33 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
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?
 
Old 09-12-2013, 10:54 AM   #3
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
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.

Are you saying you're seeing this?
 
Old 09-13-2013, 04:42 AM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Yes, I get this result:
Code:
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)
Maybe there are nmap version differences.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] checking for open ports need ports 5198, 5199 open for UDP raypsi Linux - Security 9 05-22-2012 06:51 PM
UDP & TCP Port Communication is Filtered/Open in nmap benderan Linux - Networking 8 01-21-2009 05:15 PM
Wandering, high, open UDP port detected by nmap conn-fused Linux - Security 1 05-15-2005 06:23 AM
nmap not showing all open ports Seiken Slackware 27 02-25-2005 02:54 PM
nmap-open ports master Linux - Security 2 12-13-2004 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration