stevenriz
IS-IT--Management
- May 21, 2001
- 1,069
Hi what would be the best way to block a certain IP address or addresses from communicating with our SMTP server? Currently I would like to block this IP address (198.104.156.37) and do so in IPTABLES but they still seem to get through!! I don't get it. See below at the logwatch file. Things still seem to be getting through. Am I way offbase here in my attempt to block this particular IP address?
I block it before AND after this group of iptable commands
#BLOCK IT HERE
-A RH-Firewall-1-INPUT -p tcp --dport 20:65535 -s 198.104.156.37 -j REJECT --reject-with tcp-reset
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT
#AND TRY AGAIN HERE
-A RH-Firewall-1-INPUT -p tcp --dport 20:65535 -s 198.104.156.37 -j REJECT --reject-with tcp-reset
And still on the logwatch report we see this!!!!
Logged 12207 packets on interface eth0
From 4.78.204.162 - 100 packets to tcp(25)
From 63.123.248.14 - 56 packets to tcp(25)
From 63.123.248.24 - 46 packets to tcp(25)
From 198.104.156.37 - 11913 packets to tcp(25)
From 211.179.169.3 - 79 packets to tcp(25)
From 218.237.66.213 - 13 packets to tcp(25)
I block it before AND after this group of iptable commands
#BLOCK IT HERE
-A RH-Firewall-1-INPUT -p tcp --dport 20:65535 -s 198.104.156.37 -j REJECT --reject-with tcp-reset
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT
#AND TRY AGAIN HERE
-A RH-Firewall-1-INPUT -p tcp --dport 20:65535 -s 198.104.156.37 -j REJECT --reject-with tcp-reset
And still on the logwatch report we see this!!!!
Logged 12207 packets on interface eth0
From 4.78.204.162 - 100 packets to tcp(25)
From 63.123.248.14 - 56 packets to tcp(25)
From 63.123.248.24 - 46 packets to tcp(25)
From 198.104.156.37 - 11913 packets to tcp(25)
From 211.179.169.3 - 79 packets to tcp(25)
From 218.237.66.213 - 13 packets to tcp(25)