Subject: Re: pf(4) & NAT server through DHCP?
To: James Hartley <>
From: Francisco Valladolid Hdez. <>
List: netbsd-users
Date: 08/25/2007 11:11:37
--- James Hartley <> wrote:
Hi, James.

> How does one configure pf(4) to serve as a NAT when
> the server itself
> is a DHCP client?

Let me unsertand you question.

The machine serving NAT get the IP from a DHCP server

No problem, with pf(4) you can define the internal and
external interface such as:

ext_if ="ex0"
int_if ="fxp0"

if you want nat with a ip addres get from a dhcp
server, you only need add :

nat on $ext_if from !($ext_if) to any -> ($ext_if) 

The parenthesis indicate to pf that the Ip address is
dinamically asigned.

Best Regards

> Thanks.

Therefore, if anyone is in Christ, he is a new creation; the old has gone, the new has come! - 2 Corinthians 5:17 (NIV)
Francisco Valladolid Hdez. -

Got a little couch potato? 
Check out fun summer activities for kids.