Layer 3 Exercises – Ingress and Egress Filtering

advertisement
Layer
3
Exercises
–
Ingress
and
Egress
Filtering
These
exercises
will
show
important
IP
filtering
techniques
that
significantly
improve
the
security
of
your
network,
and
the
whole
Internet,
by
preventing
IP
packets
with
“spoofed”
source
addresses
to
either
enter
or
leave
your
AS.
For
a
more
complete
explanation
of
these
concepts,
see
IETF’s
BCP
38
and
BCP
84
documents:
http://www.ietf.org/rfc/rfc2827.txt
http://www.ietf.org/rfc/rfc3704.txt
Outbound
Packet
Filtering
Traffic
leaving
your
AS
should
not
have
source
addresses
which
do
not
belong
in
your
AS:
R11:
ip access-list extended to-isp
permit ip 10.10.0.0 0.0.255.255 any
permit ip 10.254.10.0 0.0.0.3 any
deny ip any any
exit
interface FastEthernet0/0
description Link to ISP
ip access-group to-isp out
R13:
ip access-list extended to-isp
permit ip 10.10.0.0 0.0.255.255 any
permit ip 10.254.110.0 0.0.0.3 any
deny ip any any
exit
interface FastEthernet0/3/0
description Link to ISP
ip access-group to-isp out
At
the
ISP,
all
the
customer
networks
have
to
be
included:
ISP:
ip access-list extended to-upstream
permit ip 10.10.0.0 0.0.255.255 any
permit ip 10.20.0.0 0.0.255.255 any
permit ip 10.30.0.0 0.0.255.255 any
permit ip 10.40.0.0 0.0.255.255 any
permit ip 10.50.0.0 0.0.255.255 any
permit ip 10.254.0.0 0.0.255.255 any
deny ip any any
Notice that we do not apply the access list in an interface because the ISP in our lab does not have any upstream providers.
Traffic
leaving
your
network
towards
a
customer
should
not
be
sourced
from
address
space
assigned
to
that
customer!
R12
and
R13:
ip access-list extended to-vlan64
deny ip 10.10.64.0 0.0.0.255 any
permit ip any any
exit
interface FastEthernet0/1.64
description Data network 64
ip access-group to-vlan64 out
ISP:
ip access-list extended to-as10
deny ip 10.10.0.0 0.0.255.255 any
permit ip any any
exit
interface FastEthernet0/0.10
description Link to AS10
ip access-group to-as10 out
Inbound
Packet
Filtering
Traffic
that
you
receive
from
a
customer
should
never
be
sourced
from
address
space
other
than
the
one
assigned
to
the
customer.
R12
and
R13:
ip access-list extended from-vlan64
permit ip 10.10.64.0 0.0.0.255 any
deny ip any any
interface FastEthernet0/1.64
description Data network 64
ip access-group from-vlan64 in
ISP:
ip access-list extended from-as10
permit ip 10.10.0.0 0.0.255.255 any
permit ip 10.254.10.0 0.0.0.3 any
deny ip any any
interface FastEthernet0/0.10
description Link to AS10
ip access-group from-as10 in
Traffic
received
from
outside
your
AS
should
never
be
sourced
from
IP
address
space
that
belongs
in
your
AS.
ip access-list extended from-isp
deny ip 10.10.0.0 0.0.255.255 any
permit ip any any
R11:
interface FastEthernet0/0
description Link to ISP
ip access-group from-isp in
R13:
interface FastEthernet0/3/0
description Link to ISP
ip access-group from-isp in
Note:
Repeat
for
each
private
peering
too.
Management
VLAN
filtering
In
the
Layer2
labs,
we
created
a
management
VLAN
for
managing
the
switches
(SSH,
SNMP,
etc.
).
In
order
to
protect
that
network
from
malicious
access,
you
will
need
to
implement
filtering
at
the
router
level.
Here
we
assume
that
the
NOC
subnet
is
10.10.200.0/24.
R12
and
R13:
ip access-list extended to-vlan255
permit ip 10.10.200.0 0.0.0.255 any
deny any any
interface FastEthernet0/1.255
description Management network 255
ip access-group to-vlan255 out
Notes
• IPv6
access
lists
must
also
be
configured
using
the
same
principles.
We
do
not
include
the
rules
in
this
exercise
due
to
lack
of
support
for
ipv6
access
lists
in
the
version
of
IOS
running
in
our
lab.
However,
you
can
use
this
is
an
example:
R11:
ipv6 access-list extended ipv6-to-isp
permit ip FEC0:10::/32 any
permit ip FEC0:FE:0:10::/64 any
deny ip any any
exit
interface FastEthernet0/0
description Link to ISP
ipv6 traffic-filter ipv6-to-isp out
Download