LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2016, 09:47 AM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 353

Rep: Reputation: 0
Understanding output of nmap and firewall-cmd command


Dear Linux Guru's,

I have a confusion here in regards to interpreting outut from both command.

From nmap it appears port 22 and 443 are open but firewall-cmd says it is not open, which one is true??

Code:
[root@vagrant-puppet foreman]# nmap vagrant-puppet.netgear

Starting Nmap 6.40 ( http://nmap.org ) at 2016-09-07 13:33 BST
Nmap scan report for vagrant-puppet.netgear (192.168.1.16)
Host is up (0.000011s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
8443/tcp open  https-alt

Nmap done: 1 IP address (1 host up) scanned in 0.20 seconds
[root@vagrant-puppet foreman]#
And Have a look at firewall-cmd query output:
Code:
[root@vagrant-puppet foreman]# firewall-cmd --query-port=443/tcp
no
[root@vagrant-puppet foreman]# firewall-cmd --query-port=22/tcp
no
[root@vagrant-puppet foreman]# firewall-cmd --query-port=22/tcp
no
[root@vagrant-puppet foreman]#
Does that mean port 22 and 443 are not open or open ?
 
Old 09-07-2016, 10:13 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,736

Rep: Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753
What happens when you scan for open ports from another computer on your LAN?
 
Old 09-08-2016, 09:07 PM   #3
Doug G
Member
 
Registered: Jul 2013
Posts: 734

Rep: Reputation: Disabled
Try firewall-cmd --list-all to see what services/ports are open in firewalld.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Understanding Nmap Commands: In depth Tutorial Part II LXer Syndicated Linux News 0 09-19-2011 11:30 PM
LXer: Understanding Nmap Commands: In depth Tutorial with examples LXer Syndicated Linux News 0 09-17-2011 08:51 PM
nmap ? how do i do nmap in linux ? command not found abbasakhtar Linux - Newbie 2 01-02-2011 01:08 AM
understanding `lsusb` cmd drManhattan Linux - Hardware 2 11-30-2010 10:10 AM
understanding 'free' cmd drManhattan Ubuntu 4 09-21-2010 07:04 PM


All times are GMT -5. The time now is 05:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration