How can I block all traffic to port 110 to and IP using IPtables?
How can I block all traffic to port 110 to and IP using IPtables?
I have: iptables -t nat -A PREROUTING -i eth1 -d 10.10.0.254:110 -j DROP which didnt work, I also tried iptables -t nat -A PREROUTING -i eth1 -d 10.10.0.254 --destination-port 110 -j DROP and iptables -t nat -A PREROUTING -i eth1 -d 10.10.0.254 -p 110 -j DROP these didnt work either. Thanks in advance |
Don't use the NAT table for filtering. :)
Code:
iptables -A FORWARD -i eth1 -d 10.10.0.254 -p tcp --dport 110 -j DROP |
You can also use tcpwrappers to do the same -
Add the pop3 service to hosts.deny |
Quote:
|
Quote:
|
Quote:
|
i added
iptables -A FORWARD -i eth1 -d 10.10.0.254 -p tcp --dport 110 -j DROP but email still goes through to 10.10.0.254, it should all be blocked though, no? |
No... that would block POP3 connections to 10.10.0.254. If you are sending email, you need to look at SMTP.
|
Where is the traffic coming in from? eth1 or eth0?
|
All times are GMT -5. The time now is 04:16 PM. |