Date: Thu, 29 Jul 2004 23:21:40 +0200 From: Max Laier <max@love2party.net> To: RJ45 <rj45@slacknet.com> Cc: freebsd-questions@freebsd.org Subject: Re: problems with PF Message-ID: <200407292321.47252.max@love2party.net> In-Reply-To: <Pine.LNX.4.21.0407291453080.8760-100000@slacknet.slacknet.com> References: <Pine.LNX.4.21.0407291453080.8760-100000@slacknet.slacknet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-02=_rpWCBsenbvbZvc9 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 29 July 2004 22:57, RJ45 wrote: > hello, > I configured PF for natting machines on my LAN > using FreeBSD as ADSL gateway. > > I just write a simple rule > nat on tun0 from 172.16.16.0/24 to any -> (tun0) ^^^^^^ > but NAT does not work, packets are blocked. > > ip forwarding is enabled > > using ipfilter works and packets are natted succesfully with a simple rule > the same as before: > > map tun0 172.16.16.0/24 -> tun0/32 > > > I am using PF on OpenBSD since the first time it was released > so I Am sure it is not a problem of my configuration (After all more > than very simple) > using PF on FreeBSD I noticed simply packets are not NATted. Well they are, but to a wrong address or no address at all, depending on th= e=20 state of tun0 upon loading the ruleset. > I have to say I am using it on sparc64 FreeBSD 5.2.1 on ultra 60. > > anyone has some hints ? Have you applied the dynamic address patches? # cd /usr/ports/security/pf && make extract && cd work/pf_freebsd_2.03/patc= hes # less README for details. Unless you did so, the "(ifname)" syntax will not work on 5.2.= 1R.=20 As a workaround you can place a #pfctl -f <pf.conf> in your linkup script.= =20 Other than that, you might want to try a recent -current snapshot in order = to=20 build 3.5 pf (the port is still as of 3.4) out of the box. There you have a= ll=20 the fancy interface handling that comes with 3.5 (including dynamic address= es=20 of course) and additionally there is ALTQ ;) Patches for hme(4) from Pyun=20 YongHyeon are on http://people.freebsd.org/~mlaier/ALTQ_driver/ other drive= r=20 patches upon request. sparc64 should not be a problem for pf in general. > maybe on i386 works who knows ? Not with the dynamic address syntax, no. =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 --Boundary-02=_rpWCBsenbvbZvc9 Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBBCWprXyyEoT62BG0RApL5AJ0asLEcy1APdgPf2RQEbae3nUU21wCfbR7R 4SeIrlp4IKnCy1XUUl/8uR0= =pEOh -----END PGP SIGNATURE----- --Boundary-02=_rpWCBsenbvbZvc9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407292321.47252.max>