6
Firewall
103
Example: Adding an Allow IP Rule
This
example
shows
how
to
create
a
simple
Allow
rule
that
will
allow
HTTP
flows
to
be
opened
from
the
sfp1net
network
on
the
sfp1
interface
to
any
IP4
address
(
all
‐
nets
‐
ip4
)
on
the
wan
interface.
1. Change
the
current
context
to
be
the
main
IP
rule
set:
Device:/>
cc
IPRuleSet
main
2. Create
the
IP
rule:
Device:/IPRuleSet/main>
add
IPRule
Action=Allow
Service=http
SourceInterface=sfp1
SourceNetwork=sfp1net
DestinationInterface=wan
DestinationNetwork=all
‐
nets
‐
ip4
Name=lan_http
3. Return
to
the
default
route:
Device:/IPRuleSet/main>
cc
Configuration
changes
must
be
saved
by
then
issuing
an
activate
followed
by
a
commit
command.
Services
A
service
object
provides
a
way
to
reference
a
specific
IP
protocol.
A
service
object
is
typically
defined
using
one
of
the
major
transport
protocols,
TCP
or
UDP,
and
is
associated
with
a
specific
source
or
destination
port
number.
For
example,
the
HTTP
service
is
defined
as
using
the
TCP
protocol
with
the
associated
destination
port
80
and
any
source
port.
However,
service
objects
are
not
restricted
to
just
the
TCP
or
UDP
protocols.
They
can
be
used
to
encompass
ICMP
messages
as
well
as
a
user
‐
definable
IP
protocol.
A service is passive
Service
objects
are
passive
SEG
objects
in
that
they
do
not
themselves
carry
out
any
action
in
a
configuration.
Instead,
they
are
used
to
apply
security
policy
rules
in
SEG
rule
sets
to
a
specific
type
of
traffic.
For
example,
an
IP
rule
in
an
SEG
IP
rule
set
might
have
a
service
object
associated
with
it
that
specifies
that
the
rule
is
to
apply
to
HTTP
traffic.
Inclusion
in
IP
rules
is
one
the
most
important
usages
of
service
objects.
For
more
information
on
how
service
objects
are
used
with
IP
rules,
see
IP
rules
on
page
96
.
Predefined services
A
large
number
of
service
objects
are
predefined
in
the
SEG.
These
include
common
services
such
as
HTTP
.
Predefined
services
can
be
used
and
modified
just
like
custom
services.
However,
it
is
recommended
to
NOT
make
any
changes
to
predefined
services
and
instead
create
custom
services
with
the
desired
characteristics.