Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2004 17:41:02 +0200
From:      Max Laier <max@love2party.net>
To:        pf4freebsd@freelists.org
Cc:        phusion <phusion2k@gmail.com>
Subject:   [pf4freebsd] Re: Convert IPFW Ruleset to PF
Message-ID:  <200409141741.03693.max@love2party.net>
In-Reply-To: <20040914075305.R25811@hellfire.filament.org>
References:  <c3ed3fdc04091317413da12e3d@mail.gmail.com> <20040914074106.H25811@hellfire.filament.org> <20040914075305.R25811@hellfire.filament.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2074889.ZbPHChveDJ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Tuesday 14 September 2004 16:54, Mark Atkinson wrote:
> On Tue, 14 Sep 2004, Mark Atkinson wrote:
> > On Mon, 13 Sep 2004, phusion wrote:
> > > How can I convert this simple ipfw ruleset to pf?
> > >
> > > fwcmd=3D"/sbin/ipfw"
> > > ${fwcmd} -f flush
> > > ${fwcmd} add divert natd all from any to any via xl0
> > > ${fwcmd} add pass all from any to any
> > >
> > > Let me know. Thanks.
> >
> > something like this in your /etc/pf.conf
> >
> > scrub in all random-id no-df fragment reassemble
> > nat on xl0 from <IF>:network to any -> 192.168.101.245
> > pass in all
> > pass out all
> >
> > replace <IF> with your internal network nic device.
>
> also replace the 192.168.101.245 ip with your public/routable ip address.

Or use:

ext_if=3D"xl0"
int_if=3D"xl1"
nat on $ext_if from $int_if:network to any -> ($ext_if)

which will keep track of address changes on $ext_if as well.

=2D-=20
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--nextPart2074889.ZbPHChveDJ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQBBRxEPXyyEoT62BG0RAltLAJ9sE9B84SAh9fs3GxR/24+AQO8DwQCggPm3
dHWZDkZSdjO6K6tn493wjLE=
=aKdr
-----END PGP SIGNATURE-----

--nextPart2074889.ZbPHChveDJ--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409141741.03693.max>