"me" in ipfw rules - does it include aliases?
fsb at thefsb.org
Tue Sep 8 14:15:40 UTC 2009
On 9/8/09 2:58 AM, "Nikos Vassiliadis" <nvass9573 at 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...
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 :-)
More information about the freebsd-questions