4
Address Translation
76
4. The
SEG
receives
the
packet
and
compares
it
to
its
list
of
open
flows.
Once
it
finds
the
flow
in
question,
it
restores
the
original
address
and
forwards
the
packet.
195.55.66.77:80
=>
192.168.1.5:1038
5. The
original
sender
now
receives
the
response.
The
sequence
of
these
events
is
illustrated
further
in
the
diagram
below.
Figure 3. A NAT example
Example: Adding a NAT rule
The
following
example
adds
a
NAT
rule
that
will
perform
address
translation
for
all
HTTP
traffic
originating
from
the
internal
network
sfp1
as
it
flows
out
to
the
public
Internet
on
the
wan
interface.
The
IPv4
address
of
the
wan
interface
will
be
used
as
the
NATing
address
for
all
connections.
1. Change
the
current
category
to
be
the
main
IP
rule
set:
Device:/>
cc
IPRuleSet
main
2. Create
the
IP
rule:
Device:/IPRuleSet/main>
add
IPRule
Action=Allow
SourceInterface=sfp1
SourceNetwork=sfp1net
DestinationInterface=wan
DestinationNetwork=all
‐
nets
Service=http
SourceTranslation=NAT
SetSourceAddress=InterfaceAddress
Name=NAT_HTTP
3. Return
to
the
default
CLI
context
if
no
more
rules
are
needed:
Device:/IPRuleSet/main>
cc
Device:/>