Re: Translate IPFW rules to PF rules
- From: Ross Alexander <rwa@xxxxxxxxxxxxxx>
- Date: Fri, 22 Dec 2006 15:51:25 GMT
"Bert Moorthaemer" <nospam.bert.moorthaemer@xxxxxxxxxx> writes:
Hi Ross,
Thanks! I already saw some references to the "self" keyword, but I couldn't
find anything about it in the documentation.
"Ross Alexander" <rwa@xxxxxxxxxxxxxx> wrote in message
first, get a table into scope and load it up with the necessary values:
table <SELF> persist { self }
then refer to <SELF> in the obvious way. [...]
Bert,
One caveat with this technique is that if you have interfaces that
come and go - ie, dynamically created GRE tunnel endpoints or that
sort of thing - the <SELF> table will need to be manually updated as
the new self-IP addrs appear and again as they disappear. It doesn't
happen automagically, which is Something to Know.
pfctl -t SELF -T add new.self.ip.addr
pfctl -t SELF -T delete old.self.ip.addr
However, if you load your pf rules after you've created and assigned
all your interfaces you needn't worry about this, because the "self"
reserved word DOES track the comings and goings of interfaces.
Another trick I often use is to add the broadcast addresses for my
various nets to <SELF> (and sometimes 255.255.255.255 as well), then
things like
anchor to_self inet from any to <SELF>
have a more intuitive meaning. So the table set up might become
table <SELF> persist { \
self, \
$Ext_If:broadcast, \
$Int_If:broadcast, \
$DMZ_If:broadcast, \
255.255.255.255 \
}
and so on.
regards,
Ross
.
- Follow-Ups:
- Re: Translate IPFW rules to PF rules
- From: Bert Moorthaemer
- Re: Translate IPFW rules to PF rules
- References:
- Translate IPFW rules to PF rules
- From: Bert Moorthaemer
- Re: Translate IPFW rules to PF rules
- From: Helmut Schneider
- Re: Translate IPFW rules to PF rules
- From: Bert Moorthaemer
- Re: Translate IPFW rules to PF rules
- From: Ross Alexander
- Re: Translate IPFW rules to PF rules
- From: Bert Moorthaemer
- Translate IPFW rules to PF rules
- Prev by Date: MyODBC+iODBC
- Next by Date: Re: System Crash Info
- Previous by thread: Re: Translate IPFW rules to PF rules
- Next by thread: Re: Translate IPFW rules to PF rules
- Index(es):
Relevant Pages
|