OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Crist J. Clark (cristjcearthlink.net)
Date: Tue Oct 02 2001 - 02:49:00 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On Mon, Oct 01, 2001 at 08:01:21PM -0400, Ilya wrote:
    > I have a freebsd natd box with two interfaces (external ed0 and internal
    > fxp0). I found a dynamic ipfw example by Peter Brezny, and it seems to work
    > pretty good, except that nothing gets to rule number 2700. But if i move
    > that rule before divert the whole lan looses connection to internet. And any
    > place after that gets 0 hits. Any suggestions on how to make this ruleset
    > more efficient/secure?
    >
    > thank you
    >
    > PS thank you Peter for providing your ruleset to public
    >
    > ipfw show|more

    [snip]

    > 02100 427386 189325029 divert 8668 ip from any to any via ed0
    > 02200 390818 343974531 allow tcp from any to any established
    > 02300 34 1808 allow tcp from any to $myexternalip 22,80,443,25
    > setup
    > 02400 3438 192784 allow log logamount 200 icmp from any to any icmptype
    > 3,4,11,12
    > 02500 1 58 allow udp from any 53 to $myexternalip 53
    > 02600 55 3365 allow udp from any 1024-65535 to $myexternalip
    > 02700 0 0 check-state
    > 02800 177231 9731222 allow ip from $myexternalip to any keep-state out
    > xmit ed0
    > 02900 290474 27027605 allow ip from 192.168.0.0/24 to any keep-state via
    > fxp0
    > 65534 56 3788 deny log logamount 200 ip from any to any in recv ed0
    > 65535 56 18207 allow ip from any to any

    First off, it is kind of pointless to be doing dynamic rules when you
    have rule 2200. All of the TCP stuff that would get passed at the
    check-state rule are getting passed at 2200.

    Second, rule 2700 _is_ being hit. However, when a check-state rule is
    hit, the keep-state "parent" rule is the one whose count is
    incremented.

    Other issues, your UDP rules leave you pretty much wide open. Your
    ICMP rule log limit is too low with respect to your traffic
    levels. And more.

    -- 
    Crist J. Clark                           cjclarkalum.mit.edu
    

    To Unsubscribe: send mail to majordomoFreeBSD.org with "unsubscribe freebsd-security" in the body of the message