Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Dec 2004 05:56:53 +0100
From:      Max Laier <max@love2party.net>
To:        freebsd-pf@freebsd.org
Cc:        sam <sam.wun@authtec.com>
Subject:   Re: Error with sample PF code
Message-ID:  <200412180557.00999.max@love2party.net>
In-Reply-To: <41C3B6CE.4080704@authtec.com>
References:  <41C3B6CE.4080704@authtec.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <gwy addr> <gwy port> <ext addr> <ext port>
>
> ./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--



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