Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2008 08:52:34 +0200
From:      CZUCZY Gergely <gergely.czuczy@harmless.hu>
To:        Oleksandr Samoylyk <oleksandr@samoylyk.sumy.ua>
Cc:        freebsd-pf@freebsd.org
Subject:   Re: iptables rule in pf
Message-ID:  <20080508085234.2cac29ca@twoflower.in.publishing.hu>
In-Reply-To: <48222786.3050400@samoylyk.sumy.ua>
References:  <48222786.3050400@samoylyk.sumy.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/=L5Buy3.2NiRU63BpbvyJZu
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable


On Thu, 08 May 2008 01:04:54 +0300
Oleksandr Samoylyk <oleksandr@samoylyk.sumy.ua> wrote:

> Dear Community,
>=20
> I want to move some of our firewalls from Linux/iptables to FreeBSD/pf.
>=20
> After reading man pf.conf for a couple of minutes I couldn't find the
> realization of such iptables rule in pf:
>=20
> iptables -t nat -A PREROUTING -i ethX -d ! my.smtp.server -p tcp --dport
> 25 -j DROP
block in on $interface proto tcp from any to ! my.smtp.server port 25

> iptables -t nat -A PREROUTING -i ethX -p tcp --dport 2525 -j DNAT
> --to-destination :25
rdr on $interface proto tcp from any to port 2525 ->
<the_destionation_you_have_omitted> port 25

> How it can be rewriting in pf.conf?
be sure to read the openbsd faq:
http://www.openbsd.org/faq/pf

pf works quite differently then iptables, it has a different logic. you will
get used to it. just forget these "tables" which you've got used to with
iptables.

--=20
Sincerely,

CZUCZY Gergely
Harmless Digital Bt
mailto: gergely.czuczy@harmless.hu
Tel: +36-30-9702963

--Sig_/=L5Buy3.2NiRU63BpbvyJZu
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (FreeBSD)

iD8DBQFIIqM0zrC0WyuMkpsRAuXBAJ45VB7boCA17y6Jbu63P6446PNjbwCdEuAE
Gou47R0Ev0cRMjJeCJUS0kA=
=nKPD
-----END PGP SIGNATURE-----

--Sig_/=L5Buy3.2NiRU63BpbvyJZu--



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