Date: Tue, 08 Sep 2009 10:15:36 -0400 From: Tom Worster <fsb@thefsb.org> To: Nikos Vassiliadis <nvass9573@gmx.com> Cc: freebsd-questions@freebsd.org Subject: Re: "me" in ipfw rules - does it include aliases? Message-ID: <C6CBDF48.120A7%fsb@thefsb.org> In-Reply-To: <4AA600AF.9030701@gmx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9/8/09 2:58 AM, "Nikos Vassiliadis" <nvass9573@gmx.com> wrote: > Tom Worster wrote: >> the ipfw man page says: >> >> me matches any IP address configured on an interface in the system. >> >> which suggests that if i code my rules using "me" then when i add an alias >> ip address to an interface with ifconfig, these "me" rules will immediately >> work for the newly added address as they do for other addresses. > >> is that correct? > > Yes, the "me" keyword is expanded to whatever IP address is > assigned on any interface in the system. It's updated whenever > an IP address is added to or removed from an interface. Use the > simple ruleset bellow to test it yourself: > > lab# ipfw list > 00100 allow ip from me to me > 65535 deny ip from any to any > > add alias & ping alias => success > remove alias & ping alias => failure > > It's a really useful keyword, yet it's not panacea. When > using it, one has to think the possibility of an attacker > who uses "me" addresses. Use some interface checking as > well in your ruleset... > > Nikos thanks, nikos. my rules were all written with "me" and my apache config didn't mention any ip addresses so i went ahead and cut over service from a primary server to its hot standby by removing the external ip address on the primary and adding it as an alias to the standby's external interface. both servers are attached to the same upstream ethernet bridge (not necessarily the most reliable network config, i know) and it worked well. i'm interested in your other comment about the risks of using "me". for the best possible security, i'll post my ruleset here for y'all to review ... or maybe not :-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C6CBDF48.120A7%fsb>