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

Re: Rejecting connections to from eth0

Turbo Fredriksson wrote:
> I get a lot of port scans to and they MUST be comming
> from eth0!
> I thought that rules like this should suffice, but it doesn't
> seem like it does:
> ----- s n i p -----
> # Setting up connections to via external interface
> /sbin/iptables -A INPUT -i eth0 -d -j REJECT --reject-with tcp-reset --protocol tcp
> /sbin/iptables -A INPUT -i eth0 -d -j DROP --protocol udp
> ----- s n i p -----

How about dropping any traffic with a source or destination address of (on any interface besides loopback):

iptables -A INPUT -i ! lo -s -j DROP
iptables -A INPUT -i ! lo -d -j DROP

No reason to send back any ICMP of TCP resets, since you know that it's
bogus or hostile traffic.


Reply to: