实验要求:
1、在usg5500内划分三个区域分别是trust、untrust、dmz
2、对应区域匹配对应规则,确保网络连通
3、要求测试Client访问FTP服务器,PC访问ISP,ISP访问FTP服务器是否正常,还要求ISP不能访问内网
实验拓扑:
实验步骤
1、PC、Client、FTPserver配置对应ip地址
2、配置SW1,划分对应VLAN,并且规划静态路由去往ISP和FTPserver
#
sysname SW1
#
vlan batch 10 20 30
#
interface Vlanif10
ip address 192.168.1.254 255.255.255.0
#
interface Vlanif20
ip address 192.168.2.254 255.255.255.0
#
interface Vlanif30
ip address 172.16.2.2 255.255.255.252
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
#
ip route-static 10.1.1.0 255.255.255.252 172.16.2.1
ip route-static 172.16.1.0 255.255.255.252 172.16.2.1
#
2、配置ISP,规划外网地址和回程路由
#
sysname ISP
#
interface GigabitEthernet0/0/2
ip address 10.1.1.1 255.255.255.252
#
ip route-static 172.16.1.0 255.255.255.252 10.1.1.2
ip route-static 192.168.0.0 255.255.0.0 10.1.1.2
#
3、配置FW,划分对应区域,配置对应规则,配置对应路由
#
sysname FW
#
interface GigabitEthernet0/0/1
ip address 172.16.2.1 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 10.1.1.2 255.255.255.252
#
interface GigabitEthernet0/0/3
ip address 172.16.1.2 255.255.255.252
#
firewall zone trust
add interface GigabitEthernet0/0/1
#
firewall zone untrust
add interface GigabitEthernet0/0/2
#
firewall zone dmz
add interface GigabitEthernet0/0/3
#
policy interzone trust untrust inbound
policy 1
action deny
#
policy interzone trust untrust outbound
policy 1
action permit
#
policy interzone trust dmz outbound
policy 1
action permit
#
policy interzone dmz untrust inbound
policy 1
action permit
#
ip route-static 10.1.1.0 255.255.255.252 10.1.1.1
ip route-static 172.16.1.0 255.255.255.252 172.16.1.1
ip route-static 192.168.0.0 255.255.0.0 172.16.2.2
#
测试连通性
Client访问FTPserver
PC访问ISP
ISP可以访问FTPserver不能访问内网
总结
policy interzone trust untrust inbound:表示在 “信任(trust)区域到 非信任(untrust)区域的入方向策略。其中policy 1下action deny,意味着禁止从信任区域到非信任区域的入站流量。因为一般不希望非信任区域主动发起连接到信任区域。
policy interzone trust untrust outbound: 配置了从信任区域到非信任区域的出站方向策略,policy 1下action permit,即允许从信任区域主动访问非信任区域的流量,比如内部用户访问互联网。
policy interzone trust dmz outbound: 从信任区域到隔离区(DMZ)的出站策略,允许流量从信任区域流向 DMZ 区域,通常用于内部服务器(如 Web 服务器等在 DMZ 区)的管理等操作。
policy interzone dmz untrust inbound: 从 DMZ 区域到非信任区域的入站策略,允许流量进入,因为 DMZ 区域通常是用于对外提供服务的区域,需要接收来自非信任区域(如互联网)的请求 。