目标:配置NAT模式,使101.0.0.1/24网络经过防火墙后,通过192.168.1.254访问互联网
步骤:
1、配置内网两个接口的ip地址
Config system interface 进入接口配置模式
Edit port1 进入端口子模式
set alias out 设置别名
Set ip 192.168.0.1 255.255.255.0 设置IP地址及掩码
Set allowaccess Http https telnet ssh ping设置可以进行网管的方式
end
config system interface
edit port2
set alias internal
set ip 111.0.0.1 255.255.255.0
set allowaccess ping
end
2、配置静态路由
config router static
edit 1
set device "port1" 注意端口不要选错
set gateway 192.168.0.1
next
end
3、配置ACL规则
防火墙默认拦截所有通信数据,需要添加规则放行
config firewall policy
edit 1
set srcintf "any"
set dstintf "any"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set nat enable
next
end
转载于:https://blog.51cto.com/watertoeast/2068422