I know that i can use
nmap to see which ports are open on specific machine.
But what i need is a way to get it from the host side itself.
Currently, if i use
nmap on one of my machines to check the other one, i get for an example:
smb:~# nmap 192.168.1.4 PORT STATE SERVICE 25/tcp open smtp 80/tcp open http 113/tcp closed ident 143/tcp open imap 443/tcp open https 465/tcp open smtps 587/tcp open submission 993/tcp open imaps
Is there a way to do this on the host itself? Not from a remote machine to a specific host.
I know that i can do
But that is not what i want to do as i will be putting the command into a script that goes through all the machines.
22 5000 5001 5432 6002 7103 7106 7201 9200 but
lsof command showed me
22 5000 5001 5432 5601 6002 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7201 7210 11211 27017