Re: Translate IPFW rules to PF rules
- From: "Bert Moorthaemer" <nospam.bert.moorthaemer@xxxxxxxxxx>
- Date: Fri, 22 Dec 2006 19:10:25 +0100
Ross,
Thanks for the warning, but I only have static interfaces, but I will take
it into account ... you'll never know what the future brings
Thx
Bert.
"Ross Alexander" <rwa@xxxxxxxxxxxxxx> wrote in message
news:86k60kq682.fsf@xxxxxxxxxxxxxxxxx
"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
.
- 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
- Re: Translate IPFW rules to PF rules
- From: Ross Alexander
- Translate IPFW rules to PF rules
- Prev by Date: Re: System Crash Info
- Next by Date: Re: [ANN] Yate has been ported for FreeBSD
- Previous by thread: Re: Translate IPFW rules to PF rules
- Next by thread: Re: Translate IPFW rules to PF rules
- Index(es):
Relevant Pages
|