how to route to a local server thru PF router

Jon Simola jsimola at gmail.com
Thu Nov 23 19:21:30 UTC 2006


On 11/22/06, fwun at bigpond.net.au <fwun at bigpond.net.au> wrote:

> The current NAT rules in the PF router setup as:
>
> # pfctl -a NATRULES -sn
> nat on sis0 inet from 192.168.1.0/24 to any -> (sis0) round-robin
> nat on sis0 inet from 172.17.3.0/24 to any -> (sis0) round-robin
> nat on sis0 inet from 10.1.10.0/24 to any -> (sis0) round-robin
>
> I m connected to the 172.17.3.0/24 network. The local freebsd server is connected to 10.1.10.0/24 network.
>
> And the PF router is already setup as a default gateway.
>
> How can I modify the PF rules so that I can login from 172.17.3.0/24 to 10.1.10.0/24 network?

Your connection attempt will match the second nat rule. A quick way to
avoid that would be adding a nat rule such as below first (nat rules
are always first match):

no nat from 172.17.3.0/24 to 10.1.10.0/24

-- 
Jon


More information about the freebsd-pf mailing list