Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I check if a port is open or closed?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Ok I've taken over for another System Administrator who had done a lot of hardening of the system. Now I have a user who is having a problem connecting to a certain port. I believe its a firewall issue but still I want to check. Its Port 8080 which isn't in the /etc/services file but I don't think it needs to be. I tried using pmadm -l to see if the port was open but I still can't tell. So is there a method to check ports that are open. I snooped port 8080 and there is no traffic but that doesn't tell me if it is the firewall or my port that isn't allowing it. I really don't have much experience with ports so any information will probably be helpful.
 
you can use netstat, eg:

# netstat -an | grep LISTEN

or check if a process on the machine is running on port 8080,with "pfiles", eg:

# cd /proc
# pfiles * > /tmp/procs

then edit "/tmp/procs" and do a search for "8080".

Hope it helps,

Regards,

Carlos Almeida,
 
Try a telnet to the port, if it's open you should get some sort of a partial login, else it will just sit there "trying...":

telnet <ipaddress> <portnumber> IBM Certified Specialist - MQSeries
IBM Certified Specialist - AIX 5 pSeries System Administration
 
Thanks for all the help. I figured out it was running on the machine and it was opened on the firewall but only for the virtual ip of my machine. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top