开发者

Linux; How do I find logs if a program I'm running uses certain ports?

开发者 https://www.devze.com 2023-01-18 04:19 出处:网络
I am running CentOS 5 with csf firewall.I\'m running a program that can\'t connect to another开发者_如何学JAVA server (using some port that is blocked by csf I presume).Where is the log file for \'por

I am running CentOS 5 with csf firewall. I'm running a program that can't connect to another开发者_如何学JAVA server (using some port that is blocked by csf I presume). Where is the log file for 'ports'?


Netstat is the command to use to get ports and network activity. To diagonise server processes I usually use:

netstat -tln

This yields port numbers in tcp mode listening. To identify associated processes you can also use -p to grab the pid. Here is the IANA ports list.


I found my answer right after searching a few more threads.

# tail -f /var/log/messages

Shows the UDP message but not the port.... Hmm....

0

精彩评论

暂无评论...
验证码 换一张
取 消