views:

32

answers:

2

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
Because UDP does not usually have specific ports except for well-known protocols.
whatnick
Btw I overlooked this---- the above command actually showed the port. It was labeled "DPORT"
Carlo del Mundo
The D means the command treats it as a "DEFINED" variable.
whatnick
Is this correct? I thought it meant dynamic (port) for some reason.
Carlo del Mundo
+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
This was it; thanks!
Carlo del Mundo