NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: egress in pf not working



Try this config:

# Define the internal and external interfaces
internal_if = "re0"
external_if = "pppoe0"

# NAT rule
nat on $external_if inet from $internal_if:network to any -> ($external_if) round-robin

# Example pass rules (you may need to adjust these based on your requirements)
pass out on $external_if from any to any
pass in on $internal_if from any to any

On Sun, 19 May, 2024, 12:20 pm Sergio de Almeida Lenzi, <nervoso%k1.com.br@localhost> wrote:
I am trying to setup a rule in pf.conf on NetBSD10
my internal interface is re0 => 192.168.6.2/24
my internet connection is pppoe0 => with a public internet IP
netstat -rn shows pppoe0 as default

my pf.conf says:
nat on egress inet from re0:network to any -> (egress) round-robin

it accepts the pf rule but  the command:  pfctl -sn shows 
nat on egress inet from re0:network -> (egress)
when shoud be:
nat on pppoe0 inet from re0:network -> (pppoe0)
and pf does not do nat..


Am I missing something???


Home | Main Index | Thread Index | Old Index