Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: iptables centos 5
PostPosted: Sat Mar 12, 2011 11:20 am 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Hello,

My linode works fine with Centos 5.5, two IPs (one for Apache and one for Nginx). ports 80and 21 are obviously open.

Now, I am struggling to open port 30000.

What puzzles me is that
Code:
iptables -L

returns
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         


It looks like my current rules are somewhere else and that would explain why adding rules for port 30000 does not work. But I don't really understand what's going on here.

Where are the rules for ports 80 declared?
How could I add rles so that I can run bidirectionnal socket on that port.
(I need that 30000 port to communicate with Canada Post's shipping module

Thanks!


Top
   
 Post subject:
PostPosted: Sat Mar 12, 2011 9:53 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
CentOS keeps its firewall rules in the /etc/sysconfig/iptables file.

According to the output you posted, your firewall is accepting all connections. What makes you think that port 30000 is not open?


Top
   
 Post subject:
PostPosted: Sat Mar 12, 2011 11:14 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
What makes me think that port 30000 is closed? That my script requiring port 300000 did not work of course! Since what you suggested made quite a bit of sense, I reviewed my script... found a problem... and, guess what?, I can now connect to CanadaPost.
Thanks a ton!

I guess I should consider closing all those ports...


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 9:54 am 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
A port isn't "open" unless something is listening on it.

To see open (listening) TCP ports, try:

netstat -ltn

And for UDP ports:

netstat -lun

_________________
sleddog


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group