How can I check whether port 5060 is open in centos? How can I test if my linux has real a real IP address and I set no iptables blocking rules or is there any tools which I can run in my linux so my internet provider's IP or gateway is able to listen or send with port 5060?
|
|
|
||||
|
|
|
Example:
If your checking specificity for asterisk, asterisk -r and then sip show channels will show if its listening and or doing anything with items connected. If you think iptables is mucking with your results turn it off for your initial test. |
||||
|
|
|
If you have another machine running on the same network, try:
If you're able to open a connection, then the port is open. You could also get yourself a copy of NMAP and port-scan your centos machine. If the ports are closed, check system-config-securitylevel and verify that your firewall is allowing connections. I think you're also asking how to forward a port from your internet router to your centos machine (to host a web site from your house or something). If that's so, you'll need to figure out how to access your router, then forward a port from the router to your centos machine. If it doesn't work, call your ISP and ask them how to do it. However, most ISPs block access to the common ports (most ISPs don't like people running web servers or mail servers from their house). |
|||
|
If you only wish to see if the socket is bound you can use netstat or lsof to verify that the process owns the listening UDP and TCP sockets. I would also suggest using a SIP testing tool like sipsak to test the higher level functionality. Zypher: SIP is not UDP only. from RFC 3162 page 141:
|
|||
|
|
|
The other high voted nmap command is wrong, as it's a TCP scan. Use this instead:
|
||||
|
|
|
Alternatively you can check it online via this site. Just enter the IP address and port number. |
|||||
|
|
You can check whether your port open, or not here, as well as check your IP.
Will show you open ports and applications, that use them. |
||||
|
|
|
Probably a little high-level, but there are online tools to check port availability. |
|||
|
|