Firewall rules
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Jun 15 13:30:11 PDT 2004
On 2004-06-15 20:54, Robert Downes <nullentropy at lineone.net> wrote:
> I'm obviously missing something...
>
> su-2.05b# ipfw -a list
> 00100 16 1144 divert 8668 ip from any to any in via rl0
> 00200 17 964 divert 8668 ip from any to any out via rl0
> 00300 0 0 check-state
> 00400 32 3296 allow ip from me to me
> 00500 21 1268 allow ip from 192.168.0.0/24 to any keep-state
> 00600 274 25875 allow ip from 192.168.1.0/24 to any keep-state
> 00700 2 96 deny log ip from any to any
> 65535 4 429 deny ip from any to any
>
> Now, having seen plenty of examples of huge lists of rules, I'm
> obviously not seeing something that is apparent to others.
Perhaps. This depends on what you mean to achieve.
> I've tested my network using the grc.com ShieldsUp! port probing
> system. It informs me that every one of the first 1056 ports is
> stealthed (i.e. does not even reply to probes).
That's because the canonical behavior of a host that doesn't listen on a
TCP port is to return RST replies when connection attempts are seen.
You'd need something like this added to your ruleset:
add 301 deny tcp from any to any established
add 601 reset tcp from any to any
> In fact, the only thing it complains about is the fact that my IP
> replies to ICPM ping requests (though I don't understand how).
I think rule 65535 should catch these, but I haven't used ipfw in a very
long time and I might be mistaken. Anyway, if you are limiting ICMP
replies through the net.inet.icmp.icmplim sysctl pings shouldn't be a
source of trouble.
> And my /var/log/security file shows that dozens of random connections
> to ports 135 and 445 have been dropped. So, what am I missing?
You're missing a lot of Windows viruses. Ports 135 and 445 are used by
Microsoft-specific protocols (Location Service and Directory Services,
respectively). What you're seeing is a lot of attempts by trojans and
other viral programs trying to break into your "Windows" machine.
- Giorgos
More information about the freebsd-questions
mailing list