Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I though I filtered out smtp on port 25 but when I run iptables -L to list active firewall rules, I get the following still in my result:

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp

should't that be removed, I have put the following rule in comments in my shell script, saved and reloaded iptables

# iptables -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
# iptables -A OUTPUT -p tcp -m tcp --dport 25 -j ACCEPT

UPDATE: the script I have used is here, only difference is that I commented out the port 25 lines http://linode.com/wiki/index.php/CentOS_IPTables_sh

share|improve this question
2  
I think we are going to need more information here. You mention a shell script, does it completely flush all the rules? We may need you to post more of the script, or possibly all of it. –  Zoredache Jun 28 '10 at 19:22
    
I do this at the top: # Wipe the tables clean iptables -F –  solsol Jun 28 '10 at 19:26
    
that's: iptables -F –  solsol Jun 28 '10 at 19:27
    
+1 for posting the entire script (or, if it's long, putting it online and linking to it) –  David Z Jun 28 '10 at 20:38
    
the script is here, only difference is that I commented out the port 25 lines linode.com/wiki/index.php/CentOS_IPTables_sh –  solsol Jun 29 '10 at 11:51
add comment

1 Answer

Just use Centos builtin iptables mechanisms they are better designed that using a script, it flushes rules, loads modules, checks syntax etc.

share|improve this answer
    
what mechanisms are you talking about then? –  solsol Jul 23 '10 at 10:24
    
The init script and the iptables config file. /etc/sysconfig/iptables-config –  topdog Jul 24 '10 at 8:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.