5060 Does not seems to be open

For some reason, the port 5060 seems to be closed and I do not know exactly why.
When I run an nmap command I get this back

Starting Nmap 6.40 ( http://nmap.org ) at 2019-11-07 18:30 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000080s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 983 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
53/tcp   open  domain
80/tcp   open  http
81/tcp   open  hosts2-ns
82/tcp   open  xfer
83/tcp   open  mit-ml-dev
84/tcp   open  ctf
111/tcp  open  rpcbind
443/tcp  open  https
3306/tcp open  mysql
4000/tcp open  remoteanything
5000/tcp open  upnp
5222/tcp open  xmpp-client
8001/tcp open  vcom-tunnel
8088/tcp open  radan-http
8089/tcp open  unknown

You can see there is no port 5060

When I look at the specefic port it is saying that it is closed

[root@freepbx ~]# nmap -v -sV localhost -p 5060

Starting Nmap 6.40 ( http://nmap.org ) at 2019-11-07 18:46 UTC
NSE: Loaded 23 scripts for scanning.
Initiating SYN Stealth Scan at 18:46
Scanning localhost (127.0.0.1) [1 port]
Completed SYN Stealth Scan at 18:46, 0.00s elapsed (1 total ports)
Initiating Service scan at 18:46
NSE: Script scanning 127.0.0.1.
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00012s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE  SERVICE VERSION
5060/tcp closed sip

Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
           Raw packets sent: 1 (44B) | Rcvd: 2 (84B)

With a netstatus I get the next

[root@freepbx ~]# netstat -na |grep 5060
udp        0      0 0.0.0.0:5060            0.0.0.0:*
[root@freepbx ~]#

Where is it going wrong?

You are looking for tcp ports by default

lsof -i :5060

works ubiquitously as to what services are running, what gets through the firewall is another thing

This is what I get when I run the command.
How can I make sure this port is open?

[root@freepbx ~]# lsof -i :5060
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
asterisk 2098 asterisk   24u  IPv4  24919      0t0  UDP *:sip
[root@freepbx ~]#

From the outside of your firewall you can use netcat

nc -v -u -z -w 3 your.pbx.external.ip  5060-5061

leave out the -u to check for TCP

I think it was an update or something I have put back a snapshot and it is working again

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.