Sunday, May 1, 2022

Check open ports linux

 how to check open ports in ubuntu using nmap

first install nmap

# sudo apt install nmap

then type this command to check open ports.

 

# nmap -sT -O localhost

result look like this,

root@host:~# nmap -sT -O localhost
Starting Nmap 7.80 ( https://nmap.org ) at 2022-04-30 16:28 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00015s latency).
Not shown: 982 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
22/tcp    open  ssh
25/tcp    open  smtp
53/tcp    open  domain
80/tcp    open  http
110/tcp   open  pop3
143/tcp   open  imap
443/tcp   open  https
465/tcp   open  smtps
587/tcp   open  submission
631/tcp   open  ipp
993/tcp   open  imaps
995/tcp   open  pop3s
3306/tcp  open  mysql
8000/tcp  open  http-alt
8081/tcp  open  blackice-icecap
10024/tcp open  unknown
10025/tcp open  unknown
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6.32
OS details: Linux 2.6.32
Network Distance: 0 hops

OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 2.11 seconds


That's it,

0 comments: