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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a port on the server

Status
Not open for further replies.
Sep 29, 2008
105
CA
hello,

what is the command to open certain ports on linux. Is there a way to see what is also currently opened and if any ports are being blocked when attempted?

thank you.
 
Assuming iptables.

open a port:
Code:
iptables -A INPUT -p tcp --dport portnum -j ACCEPT

See existing rules
Code:
iptables -L


If you want to to log what packets are being dropped you need to explicitly deny those ports first.
Always bearing in mind that once you start firewall logging the syslog (/var/log/messages) can get pretty BIG, pretty quickly if your server has any "well known" sites that the Internet lowlifes try to crack




Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top