Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2010 15:31:45 -0400
From:      Jon Radel <jon@radel.com>
To:        freebsd-pf@freebsd.org
Subject:   Re: For better security: always "block all" or "block in all" is enough?
Message-ID:  <4C5085A1.6070905@radel.com>
In-Reply-To: <20290C577F743240B5256C89EFA753810C46894B92@HIKAWSEX01.ad.harman.com>
References:  <20290C577F743240B5256C89EFA753810C46894B92@HIKAWSEX01.ad.harman.com>

next in thread | previous in thread | raw e-mail | index | archive | help

This is a cryptographically signed message in MIME format.

--------------ms000908020603000906060608
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

On 7/28/10 2:55 PM, Spenst, Aleksej wrote:
> Hi All,
>
> I have to provide for my system better security and I guess it would be=
 better to start pf.conf with the "block all" rule opening afterwards onl=
y those incoming and outcoming ports that are supposed to be used by the =
system on external interfaces. However, it would be easier for me to writ=
e all pf rules if I start pf.conf with "block in all", i.e. if I block on=
ly traffic coming in from the outside and open all ports for outgoing tra=
ffic.
>
> - Incoming ports: only udp/68 (for dhcp client) and http/80 (for http s=
erver) always open;
> - Outgoing ports: all ports always opened. All traffic going outside fr=
om the system has "keep state";
>
> What disadvantages does it have in term of security in comparison with =
"block all"? In other words, how bad it is to have all outgoing ports alw=
ays opened and whether someone can use this to hack the sysem?
>
> Thanks a lot for any tips!!
> Aleksej.
>
>   =20
The only real answer is:  It depends.  :-)

One example of outbound blocking that some find useful:  Block all=20
outbound traffic to port 25 that comes from any machine other than=20
authorized e-mail servers.  On one network I deal in, this makes sense,=20
as the various Windows workstations have no business sending mail to=20
anything other than the internal mail servers, and if they try there's a =

good chance it's a trojan of some sort doing the sending.  Obviously,=20
there are other networks where this would make no sense.

In a general sort of way, allowing outbound traffic doesn't expose you=20
to attacks, but it makes your machine more valuable to an attacker who=20
does succeed.  For example, if you allow outbound ssh and telnet, etc.,=20
etc., it makes it easier to use your machine to stage attacks on other=20
machines.  On the other hand, if the firewall is on the server in=20
question, rather than being another piece of equipment, anybody who has=20
root can rearrange your firewall for you....

--=20

--Jon Radel
jon@radel.com



--------------ms000908020603000906060608--



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