From owner-freebsd-current@FreeBSD.ORG Sat Dec 18 04:57:04 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ED5216A4CE; Sat, 18 Dec 2004 04:57:04 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1180043D45; Sat, 18 Dec 2004 04:57:04 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CfWeM-0005KC-00; Sat, 18 Dec 2004 05:57:02 +0100 Received: from [217.227.152.17] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CfWeM-0003aL-00; Sat, 18 Dec 2004 05:57:02 +0100 From: Max Laier To: freebsd-pf@freebsd.org Date: Sat, 18 Dec 2004 05:56:53 +0100 User-Agent: KMail/1.7.1 References: <41C3B6CE.4080704@authtec.com> In-Reply-To: <41C3B6CE.4080704@authtec.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1236187.uhNXn7runR"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200412180557.00999.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 X-Mailman-Approved-At: Sat, 18 Dec 2004 13:23:06 +0000 cc: sam Subject: Re: Error with sample PF code X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2004 04:57:04 -0000 --nextPart1236187.uhNXn7runR Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline [ Please choose one mailinglist, freebsd-pf is appropriate - MOVED ] On Saturday 18 December 2004 05:49, sam wrote: > Hi, > > I found some sample code in the man pf page (just scoll down to the end > of the page, you will see it). > > After compiled it and give it a shoot, it returned error: > > # pfctl -sn > nat on tun0 inet from 192.168.9.0/24 to any -> (tun0) round-robin > nat on tun0 inet from 192.168.4.0/24 to any -> (tun0) round-robin > nat on tun0 inet from 172.16.0.0/24 to any -> (tun0) round-robin > rdr on tun0 inet proto tcp from any to 1.2.3.4 port =3D 3000 -> > 192.168.4.254 port 25 > > # ./a.out > ./a.out > > ./a.out 192.168.4.254 25 1.2.3.4 3000 > a.out: DIOCNATLOOK: No such file or directory That's ENOENT which simply means that pf was not able to find a state that= =20 matches your lookup. You should have an *open* connection to have a state=20 around. Crosscheck with $pfctl -ss > I may be have overlooked something. > > Your suggestion is highly appreciated. =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 --nextPart1236187.uhNXn7runR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBw7icXyyEoT62BG0RAqIRAJ9dPKxtcEtMk59JGFCEh0PT+SsJugCcDfbU jtVvJBupOCR8Aqcth5G1i88= =wLDv -----END PGP SIGNATURE----- --nextPart1236187.uhNXn7runR--