OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Chris BeHanna (behannazbzoom.net)
Date: Sun Mar 03 2002 - 12:17:32 CST

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

    On Fri, 1 Mar 2002, David Wolfskill wrote:

    > >From: George.Gilesmcmail.vanderbilt.edu
    > >Date: Fri, 1 Mar 2002 07:52:26 -0600
    >
    > >How do you get ipfw to pick-up DHCP value for oif in the rc.firewall script
    > >?
    >
    > >From "man ipfw":
    >
    > src and dst:
    > any | me | [not] <address/mask> [ports]
    >
    > Specifying any makes the rule match any IP address.
    >
    > Specifying me makes the rule match any IP address configured on
    > an interface in the system.

        "me" can be somewhat expensive, however. For those rules for
    which I want to use my address instead of my external interface, I do
    this near the top of /etc/rc.firewall:

        oif=dc0
        oip="`ifconfig ${oif} inet | grep inet | awk '{ print $2 }'`"
            onet="`echo ${oip} | sed -E 's/\.[0-9]{1,3}$/.0/'`"

    Note that this only works if your ISP (like mine) will continue to
    give you the same address over and over as long as you're powered up
    at lease renewal time. If that's not true, you're stuck with "me",
    unless you can rewrite your rules to use only your external interface.

    -- 
    Chris BeHanna
    Software Engineer                   (Remove "bogus" before responding.)
    behannabogus.zbzoom.net
    I was raised by a pack of wild corn dogs.
    

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