?
Solved

Open ports on UNIX

Posted on 2006-06-01
4
Medium Priority
?
520 Views
Last Modified: 2008-02-01
Hi,
 I would like to know which command to use to know the port information on a UNIX Box and I would like to know about the open ports and closed ports.
Thanks
Koppcha
0
Comment
Question by:koppcha
4 Comments
 
LVL 10

Expert Comment

by:kcarrim
ID: 16808390
Redhat 7.2 sets up an iptables-based firewall for you automatically during installation. To open a tcp port use something like:

iptables -A INPUT -s <source-ip/wildcard> -p tcp -m tcp --dport <port-number> -j ACCEPT

http://unixhelp.ed.ac.uk/CGI/man-cgi?iptables
0
 
LVL 34

Accepted Solution

by:
PsiCop earned 400 total points
ID: 16808453
If you want to see what ports are currently in use, the command is --> netstat -a

Opening a port via IP tables merely makes it accessible. There has to be something listening on it.
0
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 16808465
Try:
  netstat -ab
or
  netstat -a
if your unix distribution's netstat does not support the -b option.
0
 
LVL 88

Expert Comment

by:rindi
ID: 16809936
iptables --list

shows you which rules are setup
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question