Monday, April 14, 2025

Re: pf.conf: definition of macro for multiple interfaces

On Mon, 14 Apr 2025 09:33:38 +0000, "otto.cooper"
<otto.cooper@proton.me> wrote:

> The problem at hand is how to define the macros ext_if and int_if for
> a system with multiple interfaces.

On my router, I use ifconfig's group parameter for that:
https://man.openbsd.org/ifconfig#group

# grep internal /etc/hostname.*
/etc/hostname.vlan20:group "internal"
/etc/hostname.vlan40:group "internal"

etc, and then in pf.conf

# grep internal /etc/pf.conf
pass in on internal proto { tcp, udp } to (self) port ntp
pass in on internal proto { tcp, udp } to (self) port domain
etc

Cheers,
Daniel

No comments:

Post a Comment