Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Wheather it would check all the port numbers or only few port numbers ?
I do not think it would check all the port numbers when the above command
Because when i excute the command Nmap localhost in the same
machine it shows the output as below ,
There is other port number 8834 which is listening but it is not displaying
in the result below . So the above command would check only few ports ?
22/tcp open ssh
25/tcp open smtp
80/tcp open http
443/tcp open https
514/tcp open shell
3306/tcp open mysql
Nmap offers a plethora of options, some for specifying ports and port ranges, as well as protocols, which you can see in the man page. To be sure that nmap is scanning at least as high as the port you are questioning, try nmap with the -p1-8834 argument, telling it to scan ports from #1 to #8834.
I don't know, and the man page IIRC did not specify. It's common however for port scanners to (by default) only scan the first 1024 ports. If you cannot find the answer in the manpage or Google, I would just err on the cautious side and specify the port range you desire.
By default, Nmap scans all ports up to and including 1024 as well as higher numbered ports listed in the nmap-services file for the protocol(s) being scanned.
The file nmap-services is typically installed at /usr/share/nmap/nmap-services
Hi! Sorry if this post is already closed but I was wondering if you could tell me something curious about nmap. I'll be straight.
If I run nmap on a computer with "localhost" as destination it tells me that I have 3 ports open; but if I run the same nmap with my ip address as parameter I find out that some ports that figured as open are closed in fact. Does anyone know why can this happen? Which result should I consider??
Thanks for the command. So by default till how many port it would scan ?
The latest version of Nmap scans the top 1000 ports by default. The top ports are based on popularity which is in the nmap-services file, third column. A -F scan means fast scan, this will scan the top 100 ports.
Because an application can bind to any combination of interfaces or IPs your system has. You have some programs listening only on localhost.
Why are you using nmap?
Right, maybe that's the reason, but, I did a similar test on a Windows box and found out that locally (using ip or localhost) for e.g.: msrpc, is enumerated as open and, remotelly, is enumerated as closed. This is really strange (maybe something to do with the way windows handles the protocol stack).
I'm using nmap to have some control of which services are available to remote hosts. It helps me to know if there is any of them I don't use to shut them down and minimize security risks. Not big deal, but helps a little.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.