FW: Help needed for IPTABLES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
All experts Hi,
 
I try to secure a RedHat ES 3.0
I have two NIC's etho and eth1.
 
I want to at the begging to drop everything on eth0 and accept only what i need like SSH.
 
I use this rules
 
iptables -A INPUT -i lo -p all -j ACCEPT
iptables -A OUTPUT -o lo -p all -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISH, RELATED -j ACCEPT
 
for dropping all connection i use this rule
 
iptables -A INPUT -i eth0 -p tcp --tcp-option ! 2 REJECT --reject-with tcp-reset
 
for accepting i use this rule
 
iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
 
basically i stop all connection but it effect booth eth0 and eth1
and for port 22 i can't connect , surprise when i run   iptables -L -v  i get  as SSH connection was accepted.
 
at the same time i found that the output connection like internet do not work.
 
i need help on this issue.
 
Thanks
Hari
 
***********************************************************************************
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster@xxxxxxxxxxxxx and destroy the original message.
***********************************************************************************

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux