I am running CentOS 5 with csf firewall. I'm running a program that can't connect to another server (using some port that is blocked by csf I presume). Where is the log file for 'ports'?
A:
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....
Carlo del Mundo
2010-09-29 02:19:48
Because UDP does not usually have specific ports except for well-known protocols.
whatnick
2010-09-29 02:26:50
Btw I overlooked this---- the above command actually showed the port. It was labeled "DPORT"
Carlo del Mundo
2010-09-30 13:07:07
The D means the command treats it as a "DEFINED" variable.
whatnick
2010-10-01 03:20:20
Is this correct? I thought it meant dynamic (port) for some reason.
Carlo del Mundo
2010-10-04 14:16:11
+2
A:
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.
whatnick
2010-09-29 02:24:43