<s>
Unix	B-Operating_System
security	I-Operating_System
refers	O
to	O
the	O
means	O
of	O
securing	O
a	O
Unix	B-Application
or	O
Unix-like	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
.	O
</s>
<s>
A	O
secure	O
environment	O
is	O
achieved	O
not	O
only	O
by	O
the	O
design	O
concepts	O
of	O
these	O
operating	B-General_Concept
systems	I-General_Concept
,	O
but	O
also	O
through	O
vigilant	O
user	O
and	O
administrative	B-Application
practices	O
.	O
</s>
<s>
All	O
files	O
in	O
a	O
typical	O
Unix	B-Application
filesystem	I-Application
have	O
permissions	O
set	O
enabling	O
different	O
access	O
to	O
a	O
file	O
.	O
</s>
<s>
Permissions	O
on	O
a	O
file	O
are	O
commonly	O
set	O
using	O
the	O
chmod	B-Application
command	O
and	O
seen	O
through	O
the	O
ls	B-Application
command	O
.	O
</s>
<s>
Unix	B-Application
permissions	O
permit	O
different	O
users	O
access	O
to	O
a	O
file	O
.	O
</s>
<s>
More	O
advanced	O
Unix	B-Application
filesystems	I-Application
include	O
the	O
Access	O
Control	O
List	O
concept	O
which	O
allows	O
permissions	O
to	O
be	O
granted	O
to	O
multiple	O
users	O
or	O
groups	O
.	O
</s>
<s>
In	O
this	O
example	O
,	O
which	O
is	O
from	O
the	O
command	O
on	O
the	O
Linux	B-Application
operating	I-Application
system	I-Application
,	O
the	O
user	O
sue	O
is	O
granted	O
write	O
permission	O
to	O
the	O
/pvr	O
directory	O
.	O
</s>
<s>
Users	O
under	O
Unix	B-Application
style	O
operating	B-General_Concept
systems	I-General_Concept
often	O
belong	O
to	O
managed	O
groups	O
with	O
specific	O
access	O
permissions	O
.	O
</s>
<s>
Many	O
Unix	B-Application
implementations	O
add	O
an	O
additional	O
layer	O
of	O
security	O
by	O
requiring	O
that	O
a	O
user	O
be	O
a	O
member	O
of	O
the	O
wheel	B-Operating_System
user	B-Application
privileges	I-Application
group	I-Application
in	O
order	O
to	O
access	O
the	O
su	B-Device
command	O
.	O
</s>
<s>
Most	O
Unix	B-Application
and	O
Unix-like	B-Operating_System
systems	I-Operating_System
have	O
an	O
account	O
or	O
group	O
which	O
enables	O
a	O
user	O
to	O
exact	O
complete	O
control	O
over	O
the	O
system	O
,	O
often	O
known	O
as	O
a	O
root	B-Application
account	I-Application
.	O
</s>
<s>
A	O
root	B-Application
account	I-Application
however	O
is	O
necessary	O
for	O
administrative	B-Application
purposes	O
,	O
and	O
for	O
the	O
above	O
security	O
reasons	O
the	O
root	B-Application
account	I-Application
is	O
seldom	O
used	O
for	O
day	O
to	O
day	O
purposes	O
(	O
the	O
sudo	B-Device
program	O
is	O
more	O
commonly	O
used	O
)	O
,	O
so	O
usage	O
of	O
the	O
root	B-Application
account	I-Application
can	O
be	O
more	O
closely	O
monitored	O
.	O
</s>
<s>
Root	B-Application
access	I-Application
"	O
as	O
it	O
should	O
be	O
"	O
can	O
be	O
visualised	O
by	O
those	O
familiar	O
with	O
the	O
Superman	B-Application
stories	O
using	O
the	O
following	O
analogy	O
:	O
</s>
<s>
Using	O
a	O
root	B-Application
account	I-Application
is	O
rather	O
like	O
being	O
Superman	B-Application
;	O
an	O
administrator	O
's	O
regular	O
user	O
is	O
more	O
like	O
Clark	O
Kent	O
.	O
</s>
<s>
Clark	O
Kent	O
becomes	O
Superman	B-Application
for	O
only	O
as	O
long	O
as	O
necessary	O
,	O
in	O
order	O
to	O
save	O
people	O
.	O
</s>
<s>
Root	B-Application
access	I-Application
should	O
be	O
used	O
in	O
the	O
same	O
fashion	O
.	O
</s>
<s>
This	O
is	O
analogous	O
to	O
using	O
the	O
sudo	B-Device
program	O
.	O
</s>
<s>
Unix	B-Application
has	O
many	O
tools	O
that	O
can	O
improve	O
security	O
if	O
used	O
properly	O
by	O
users	O
and	O
administrators	O
.	O
</s>
<s>
Selecting	O
a	O
strong	O
password	O
and	O
guarding	O
it	O
properly	O
are	O
probably	O
the	O
most	O
important	O
things	O
a	O
user	O
can	O
do	O
to	O
improve	O
Unix	B-Operating_System
security	I-Operating_System
.	O
</s>
<s>
In	O
Unix	B-Application
systems	I-Application
,	O
the	O
essential	O
information	O
about	O
users	O
is	O
stored	O
under	O
the	O
file	O
/etc/passwdThis	O
file	O
keeps	O
track	O
of	O
the	O
users	O
registered	O
in	O
the	O
system	O
and	O
their	O
main	O
definitions	O
.	O
</s>
<s>
Passwords	O
,	O
or	O
more	O
correctly	O
,	O
the	O
hash	B-Algorithm
of	O
the	O
password	O
,	O
can	O
also	O
be	O
stored	O
in	O
the	O
same	O
place	O
.	O
</s>
<s>
The	O
entries	O
in	O
/etc/passwd	O
occupy	O
exactly	O
one	O
line	O
each	O
,	O
and	O
have	O
the	O
following	O
form	O
:	O
</s>
<s>
Since	O
all	O
users	O
must	O
have	O
read	O
access	O
to	O
the	O
/etc/passwd	O
file	O
to	O
do	O
many	O
common	O
tasks	O
(	O
ls	B-Application
-l	O
/home	O
will	O
use	O
/etc/passwd	O
to	O
map	O
UIDs	O
to	O
login	O
names	O
for	O
example	O
)	O
,	O
anyone	O
could	O
also	O
read	O
the	O
password	B-Algorithm
hashes	I-Algorithm
of	O
other	O
users	O
.	O
</s>
<s>
To	O
solve	O
this	O
problem	O
,	O
the	O
file	O
/etc/shadow	B-Protocol
was	O
created	O
to	O
store	O
the	O
password	B-Algorithm
hashes	I-Algorithm
,	O
with	O
only	O
root	B-Application
having	O
read	O
access	O
.	O
</s>
<s>
Under	O
password	B-Protocol
shadowing	I-Protocol
,	O
the	O
2nd	O
field	O
(	O
password	B-Algorithm
hash	I-Algorithm
)	O
is	O
replaced	O
by	O
an	O
'	O
x	O
 '	O
which	O
tells	O
the	O
system	O
to	O
retrieve	O
the	O
corresponding	O
user	O
's	O
password	O
via	O
the	O
/etc/shadow	B-Protocol
file	O
.	O
</s>
<s>
The	O
/etc/shadow	B-Protocol
file	O
often	O
only	O
contains	O
values	O
for	O
the	O
first	O
two	O
fields	O
:	O
</s>
<s>
The	O
remaining	O
fields	O
in	O
the	O
/etc/shadow	B-Protocol
file	O
include	O
:	O
</s>
<s>
These	O
fields	O
may	O
be	O
used	O
to	O
improve	O
Unix	B-Operating_System
security	I-Operating_System
by	O
enforcing	O
a	O
password	O
security	O
policy	O
.	O
</s>
<s>
Operating	B-General_Concept
systems	I-General_Concept
,	O
like	O
all	O
software	O
,	O
may	O
contain	O
bugs	O
in	O
need	O
of	O
fixing	O
or	O
may	O
be	O
enhanced	O
with	O
the	O
addition	O
of	O
new	O
features	O
.	O
</s>
<s>
Patching	O
the	O
operating	B-General_Concept
system	I-General_Concept
in	O
a	O
secure	O
manner	O
requires	O
that	O
the	O
software	O
come	O
from	O
a	O
trustworthy	O
source	O
and	O
not	O
have	O
been	O
altered	O
since	O
it	O
was	O
packaged	O
.	O
</s>
<s>
Common	O
methods	O
for	O
verifying	O
that	O
operating	B-General_Concept
system	I-General_Concept
patches	O
have	O
not	O
been	O
altered	O
include	O
the	O
use	O
of	O
the	O
digital	O
signature	O
of	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
,	O
such	O
as	O
a	O
SHA-256	B-Algorithm
based	O
checksum	O
,	O
or	O
the	O
use	O
of	O
read-only	O
media	O
.	O
</s>
<s>
From	O
a	O
security	O
standpoint	O
,	O
the	O
specific	O
packaging	O
method	O
,	O
such	O
as	O
the	O
dpkg	B-Language
package	I-Language
manager	I-Language
or	O
the	O
RPM	B-Application
Package	I-Application
Manager	I-Application
format	O
originally	O
from	O
Debian	O
and	O
Red	O
Hat	O
Linux	B-Application
,	O
respectively	O
is	O
not	O
as	O
important	O
as	O
the	O
use	O
of	O
features	O
which	O
ensure	O
the	O
integrity	O
of	O
the	O
patch	O
itself	O
.	O
</s>
<s>
The	O
drawback	O
,	O
absent	O
an	O
accompanying	O
cryptographic	B-Algorithm
hash	I-Algorithm
value	I-Algorithm
,	O
is	O
that	O
the	O
user	O
must	O
be	O
able	O
to	O
perform	O
a	O
security	O
analysis	O
of	O
the	O
code	O
themselves	O
.	O
</s>
<s>
Linux	B-Application
distributions	O
which	O
use	O
the	O
RPM	B-Application
Package	I-Application
Manager	I-Application
format	O
for	O
providing	O
base	O
functionality	O
and	O
software	O
updates	O
make	O
use	O
of	O
cryptographic	B-Algorithm
hashes	I-Algorithm
and	O
GPG	B-Application
to	O
ensure	O
content	O
integrity	O
.	O
</s>
<s>
The	O
hash	B-Algorithm
values	O
are	O
packaged	O
with	O
the	O
RPM	B-Application
file	O
and	O
verified	O
when	O
the	O
package	O
is	O
installed	O
.	O
</s>
<s>
Linux	B-Application
distributions	O
which	O
use	O
the	O
Debian	O
.deb	O
package	O
format	O
for	O
providing	O
base	O
functionality	O
and	O
software	O
updates	O
make	O
use	O
of	O
GPG	B-Application
signatures	O
to	O
ensure	O
content	O
integrity	O
.	O
</s>
<s>
The	O
commands	O
inetd	B-Protocol
and	O
xinetd	B-Operating_System
act	O
as	O
super-servers	O
for	O
a	O
variety	O
of	O
network	O
protocols	O
such	O
as	O
rlogin	B-Application
,	O
telnet	B-Protocol
and	O
ftp	B-Protocol
.	O
</s>
<s>
There	O
are	O
some	O
operating	B-General_Concept
systems	I-General_Concept
which	O
are	O
secure	O
by	O
default	O
.	O
</s>
<s>
Amongst	O
others	O
,	O
the	O
free	B-Operating_System
BSD	I-Operating_System
flavours	O
(	O
FreeBSD	B-Operating_System
,	O
NetBSD	B-Device
,	O
and	O
OpenBSD	B-Operating_System
)	O
are	O
proactively	O
secure	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
output	O
of	O
netstat	O
on	O
a	O
NetBSD	B-Device
3.0	O
workstation	O
clearly	O
outlines	O
this	O
technique	O
:	O
</s>
<s>
tcp	O
0	O
0	O
localhost.smtp	O
*	O
.	O
</s>
<s>
tcp	O
0	O
0	O
*	O
.ssh	O
*	O
.	O
</s>
<s>
tcp6	O
0	O
0	O
localhost.smtp	O
*	O
.	O
</s>
<s>
tcp6	O
0	O
0	O
*	O
.ssh	O
*	O
.	O
</s>
<s>
root	B-Application
sendmail	B-Application
569	O
4	O
tcp	O
localhost.smtp	O
*	O
.	O
</s>
<s>
root	B-Application
sshd	O
593	O
4	O
tcp	O
*	O
.ssh	O
*	O
.	O
</s>
<s>
shows	O
that	O
on	O
this	O
machine	O
only	O
the	O
SSH	B-Protocol
service	O
is	O
listening	O
to	O
all	O
public	O
network	O
interfaces	O
of	O
the	O
computer	O
.	O
</s>
<s>
sendmail	B-Application
is	O
listening	O
to	O
the	O
loopback	B-Protocol
interface	B-Protocol
only	O
.	O
</s>
<s>
Access	O
to	O
a	O
service	O
may	O
be	O
further	O
restricted	O
by	O
using	O
a	O
firewall	B-Application
.	O
</s>
<s>
File	O
system	O
security	O
within	O
UNIX	B-Application
and	O
Unix-like	B-Operating_System
systems	I-Operating_System
is	O
based	O
on	O
9	O
permission	O
bits	O
,	O
set	O
user	O
and	O
group	B-Application
ID	I-Application
bits	O
,	O
and	O
the	O
sticky	B-Application
bit	I-Application
,	O
for	O
a	O
total	O
of	O
12	O
bits	O
.	O
</s>
<s>
The	O
set	O
user	O
ID	O
and	O
set	O
group	B-Application
ID	I-Application
bits	O
,	O
commonly	O
abbreviated	O
set-UID	O
and	O
set-GID	O
respectively	O
,	O
are	O
used	O
to	O
change	O
the	O
identity	O
of	O
the	O
process	O
which	O
executes	O
a	O
file	O
having	O
either	O
or	O
both	O
of	O
those	O
bits	O
set	O
.	O
</s>
<s>
A	O
file	O
having	O
the	O
set-GID	O
permission	O
bit	O
set	O
will	O
cause	O
a	O
process	O
which	O
executes	O
that	O
file	O
to	O
temporarily	O
switch	O
the	O
effective	O
group	B-Application
ID	I-Application
to	O
that	O
of	O
the	O
file	O
group	O
.	O
</s>
<s>
A	O
process	O
may	O
then	O
alternate	O
between	O
the	O
effective	O
user	O
or	O
group	B-Application
ID	I-Application
which	O
it	O
inherited	O
from	O
the	O
file	O
and	O
the	O
real	O
user	O
or	O
group	B-Application
ID	I-Application
which	O
it	O
inherited	O
when	O
the	O
user	O
logged	O
on	O
to	O
the	O
system	O
.	O
</s>
<s>
The	O
sticky	B-Application
bit	I-Application
,	O
formally	O
known	O
as	O
the	O
save	O
text	O
on	O
swap	O
bit	O
,	O
derives	O
its	O
name	O
from	O
its	O
original	O
purpose	O
.	O
</s>
<s>
Originally	O
the	O
sticky	B-Application
bit	I-Application
caused	O
a	O
process	O
's	O
initial	O
memory	O
image	O
to	O
be	O
stored	O
as	O
a	O
contiguous	O
image	O
on	O
the	O
disk	O
drive	O
which	O
was	O
used	O
to	O
store	O
real	O
memory	O
pages	O
when	O
they	O
were	O
not	O
in	O
use	O
.	O
</s>
<s>
Modern	O
UNIX	B-Application
systems	I-Application
no	O
longer	O
perform	O
that	O
function	O
when	O
the	O
bit	O
is	O
set	O
,	O
but	O
the	O
name	O
has	O
been	O
preserved	O
nonetheless	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
files	O
,	O
the	O
sticky-bit	O
may	O
be	O
used	O
by	O
the	O
system	O
to	O
indicate	O
the	O
style	O
of	O
file	B-Application
locking	I-Application
to	O
be	O
performed	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
directories	O
,	O
the	O
sticky	B-Application
bit	I-Application
prevents	O
any	O
process	O
,	O
other	O
than	O
one	O
which	O
has	O
super-user	B-Application
privileges	O
or	O
one	O
having	O
an	O
effective	O
user	O
ID	O
of	O
the	O
file	O
owner	O
,	O
from	O
deleting	O
a	O
file	O
within	O
that	O
directory	O
.	O
</s>
<s>
The	O
sticky	B-Application
bit	I-Application
is	O
most	O
commonly	O
used	O
on	O
publicly	O
writable	O
directories	O
,	O
such	O
as	O
the	O
various	O
temporary	O
working	O
space	O
directories	O
on	O
the	O
system	O
.	O
</s>
<s>
Root	B-Application
squash	O
is	O
a	O
special	O
mapping	O
of	O
the	O
remote	O
superuser	B-Application
(	O
root	B-Application
)	O
identity	O
when	O
using	O
identity	O
authentication	O
(	O
local	O
user	O
is	O
the	O
same	O
as	O
remote	O
user	O
)	O
.	O
</s>
<s>
Under	O
root	B-Application
squash	O
,	O
a	O
client	O
's	O
uid	O
0	O
(	O
root	B-Application
)	O
is	O
mapped	O
to	O
65534	O
(	O
nobody	O
)	O
.	O
</s>
<s>
It	O
is	O
primarily	O
a	O
feature	O
of	O
NFS	B-Protocol
but	O
may	O
be	O
available	O
on	O
other	O
systems	O
as	O
well	O
.	O
</s>
<s>
Root	B-Application
squash	O
is	O
a	O
technique	O
to	O
avoid	O
privilege	O
escalation	O
on	O
the	O
client	O
machine	O
via	O
suid	O
executables	O
Setuid	O
.	O
</s>
<s>
Without	O
root	B-Application
squash	O
,	O
an	O
attacker	O
can	O
generate	O
suid	O
binaries	O
on	O
the	O
server	O
that	O
are	O
executed	O
as	O
root	B-Application
on	O
other	O
client	O
,	O
even	O
if	O
the	O
client	O
user	O
does	O
not	O
have	O
superuser	B-Application
privileges	O
.	O
</s>
<s>
It	O
does	O
not	O
protect	O
clients	O
against	O
a	O
malicious	O
server	O
(	O
where	O
root	B-Application
can	O
generate	O
suid	O
binaries	O
)	O
,	O
nor	O
does	O
it	O
protect	O
the	O
files	O
of	O
any	O
user	O
other	O
than	O
root	B-Application
(	O
as	O
malicious	O
clients	O
can	O
impersonate	O
any	O
user	O
)	O
.	O
</s>
<s>
SELinux	B-Application
is	O
the	O
set	O
of	O
kernel	O
extensions	O
to	O
control	O
access	O
more	O
precisely	O
,	O
strictly	O
defining	O
both	O
if	O
and	O
how	O
files	O
,	O
folders	O
,	O
network	B-Protocol
ports	I-Protocol
and	O
other	O
resources	O
can	O
be	O
accessed	O
by	O
the	O
confined	O
process	O
.	O
</s>
<s>
It	O
can	O
also	O
limit	O
processes	O
that	O
run	O
as	O
root	B-Application
.	O
</s>
<s>
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
are	O
immune	O
to	O
most	O
Microsoft	O
Windows	O
viruses	O
because	O
binaries	O
created	O
to	O
run	O
on	O
Windows	O
generally	O
wo	O
n't	O
run	O
on	O
other	O
platforms	O
.	O
</s>
<s>
However	O
,	O
many	O
Unix	B-Operating_System
like	I-Operating_System
installations	O
provide	O
file	O
storage	O
services	O
to	O
Microsoft	O
Windows	O
clients	O
,	O
such	O
as	O
through	O
the	O
use	O
of	O
Samba	B-Language
software	I-Language
,	O
and	O
may	O
unintentionally	O
become	O
a	O
repository	O
for	O
viruses	O
stored	O
by	O
users	O
.	O
</s>
<s>
It	O
is	O
common	O
for	O
Unix	B-Application
servers	O
to	O
act	O
as	O
mail	B-Protocol
transfer	I-Protocol
agents	I-Protocol
and	O
as	O
a	O
consequence	O
email	O
virus	O
scanning	O
is	O
often	O
installed	O
.	O
</s>
<s>
The	O
ClamAV	B-Application
virus	O
scanner	O
is	O
available	O
in	O
source	O
code	O
form	O
and	O
may	O
be	O
used	O
to	O
scan	O
Unix	B-Application
file	I-Application
systems	I-Application
for	O
viruses	O
which	O
infect	O
other	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
There	O
are	O
viruses	O
and	O
worms	O
that	O
target	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
In	O
fact	O
,	O
the	O
first	O
computer	O
worm	O
—	O
the	O
Morris	O
worm	O
—	O
targeted	O
Unix	B-Application
systems	I-Application
.	O
</s>
<s>
Network	B-Application
firewall	I-Application
protects	O
systems	O
and	O
networks	O
from	O
network	O
threats	O
which	O
exist	O
on	O
the	O
opposite	O
side	O
of	O
the	O
firewall	B-Application
.	O
</s>
<s>
Firewalls	B-Application
can	O
block	O
access	O
to	O
strictly	O
internal	O
services	O
,	O
unwanted	O
users	O
and	O
in	O
some	O
cases	O
filter	O
network	O
traffic	O
by	O
content	O
.	O
</s>
<s>
iptables	B-Application
is	O
the	O
current	O
user	O
interface	B-Protocol
for	O
interacting	O
with	O
Linux	B-Application
kernel	O
netfilter	B-Application
functionality	O
.	O
</s>
<s>
It	O
replaced	O
ipchains	B-Application
.	O
</s>
<s>
Other	O
Unix	B-Operating_System
like	I-Operating_System
operating	B-General_Concept
systems	I-General_Concept
may	O
provide	O
their	O
own	O
native	O
functionality	O
and	O
other	O
open	B-License
source	I-License
firewall	B-Application
products	O
exist	O
.	O
</s>
<s>
More	O
detailed	O
information	O
about	O
iptables	B-Application
is	O
contained	O
elsewhere	O
.	O
</s>
<s>
A	O
brief	O
discussion	O
is	O
contained	O
here	O
in	O
order	O
to	O
describe	O
how	O
iptables	B-Application
may	O
be	O
used	O
to	O
configure	O
a	O
Linux	B-Application
firewall	B-Application
.	O
</s>
<s>
netfilter	B-Application
provides	O
a	O
state-full	O
packet	O
filter	O
which	O
can	O
be	O
configured	O
according	O
to	O
network	B-Protocol
interface	I-Protocol
,	O
protocol	B-Protocol
,	O
source	B-Protocol
and/or	I-Protocol
destination	I-Protocol
address	I-Protocol
,	O
source	B-Protocol
and/or	I-Protocol
destination	I-Protocol
port	I-Protocol
and	O
the	O
state	O
of	O
the	O
packet	O
.	O
</s>
<s>
A	O
network	O
packet	O
traverses	O
several	O
chains	O
between	O
the	O
time	O
it	O
is	O
received	O
by	O
a	O
network	B-Protocol
interface	I-Protocol
and	O
the	O
time	O
it	O
is	O
accepted	O
by	O
the	O
host	O
or	O
forwarded	O
to	O
another	O
host	O
.	O
</s>
<s>
The	O
chain	O
is	O
traversed	O
for	O
all	O
packets	O
as	O
they	O
are	O
received	O
by	O
a	O
network	B-Protocol
interface	I-Protocol
,	O
regardless	O
of	O
whether	O
they	O
are	O
to	O
be	O
accepted	O
by	O
the	O
host	O
or	O
forwarded	O
to	O
another	O
host	O
.	O
</s>
<s>
The	O
chain	O
is	O
traversed	O
for	O
all	O
packets	O
as	O
they	O
are	O
transmitted	O
by	O
a	O
network	B-Protocol
interface	I-Protocol
.	O
</s>
<s>
The	O
chain	O
is	O
traversed	O
for	O
those	O
packets	O
are	O
being	O
routed	O
through	O
the	O
host	O
from	O
one	O
network	B-Protocol
interface	I-Protocol
to	O
another	O
,	O
such	O
as	O
is	O
the	O
case	O
for	O
a	O
multi-homed	O
system	O
(	O
a	O
system	O
with	O
more	O
than	O
one	O
physical	B-Protocol
network	I-Protocol
interface	I-Protocol
)	O
.	O
</s>
<s>
The	O
simplest	O
iptables	B-Application
firewall	B-Application
consists	O
of	O
rules	O
for	O
each	O
desired	O
service	O
,	O
followed	O
by	O
a	O
rule	O
which	O
indicates	O
that	O
any	O
packets	O
which	O
reach	O
this	O
rule	O
are	O
dropped	O
.	O
</s>
<s>
A	O
system	O
which	O
only	O
permitted	O
,	O
for	O
example	O
,	O
incoming	O
email	O
traffic	O
would	O
have	O
a	O
rule	O
which	O
accepted	O
connections	O
on	O
the	O
SMTP	B-Protocol
port	O
,	O
and	O
then	O
dropped	O
others	O
.	O
</s>
<s>
In	O
some	O
instances	O
it	O
may	O
be	O
desirable	O
for	O
a	O
firewall	B-Application
to	O
limit	O
certain	O
outgoing	O
connections	O
to	O
a	O
certain	O
set	O
of	O
approved	O
systems	O
.	O
</s>
<s>
This	O
is	O
known	O
as	O
egress	B-Protocol
filtering	I-Protocol
and	O
may	O
be	O
used	O
to	O
prevent	O
viruses	O
within	O
the	O
firewall	B-Application
from	O
escaping	O
to	O
other	O
systems	O
.	O
</s>
<s>
For	O
example	O
,	O
it	O
may	O
be	O
the	O
policy	O
of	O
a	O
network	O
to	O
limit	O
outgoing	O
email	O
connections	O
to	O
a	O
single	O
authorized	O
email	B-Protocol
servers	I-Protocol
as	O
a	O
way	O
of	O
combating	O
e-mail	O
spam	O
.	O
</s>
<s>
This	O
rule	O
assumes	O
that	O
the	O
host	O
which	O
is	O
acting	O
as	O
the	O
firewall	B-Application
will	O
not	O
be	O
sending	O
email	O
itself	O
,	O
such	O
as	O
to	O
the	O
email	B-Protocol
server	I-Protocol
.	O
</s>
<s>
This	O
is	O
a	O
good	O
assumption	O
as	O
typically	O
a	O
firewall	B-Application
system	O
contains	O
the	O
minimal	O
amount	O
of	O
system	O
code	O
needed	O
to	O
act	O
as	O
a	O
firewall	B-Application
.	O
</s>
<s>
A	O
more	O
restrictive	O
chain	O
would	O
contain	O
permissive	O
(	O
)	O
entries	O
for	O
those	O
services	O
which	O
may	O
be	O
accessed	O
outside	O
the	O
firewall	B-Application
and	O
then	O
a	O
restrictive	O
(	O
)	O
policy	O
for	O
the	O
chain	O
itself	O
.	O
</s>
<s>
Sendmail	B-Application
-	O
banners	O
help	O
header	O
version	O
etc	O
.	O
</s>
