赞
踩
基本配置:
[FW1] security-policy // 配置安全策略
[FW1-policy-security] rule name lyshark // 规则名称
[FW1-policy-security-rule-lyshark] source-zone trust // 原安全区域(内部)
[FW1-policy-security-rule-lyshark] destination-zone untrust // 目标安全区域(外部)
[FW1-policy-security-rule-lyshark] source-address any // 原地址区域
[FW1-policy-security-rule-lyshark] destination-address any // 目标地址区域
[FW1-policy-security-rule-lyshark] service any // 放行所有服务
[FW1-policy-security-rule-lyshark] action permit // 放行配置
[FW1-policy-security-rule-lyshark] quit
使防火墙交换机能够互ping:
security-policy
rule name 1
source-zone local //如需防火墙ping别的设备需要配置local区域的安全策略,因为防火墙接口的区域都是local
destination-zone trust service protocol icmp //从local区域放通到trust区域,放通icmp协议,local区域为防火墙本身所有接口
action permit
interface GigabitEthernet1/0/1
undo shutdown
ip address 10.1.0.14 255.255.255.252
service-manage ping permit //防火墙接口放通ping包,也可以放通http、ssh、telnet等
配置内外网接口:
[FW1] interface GigabitEthernet 1/0/2 // 选择外网接口
[FW1-GigabitEthernet1/0/2] undo shutdown // 开启外网接口
[FW1-GigabitEthernet1/0/2] ip address 10.10.10.10 255.255.255.0 // 配置IP地址
[FW1-GigabitEthernet1/0/2] gateway 10.10.10.20 // 配置网关
[FW1-GigabitEthernet1/0/2] undo service-manage enable
[FW1-GigabitEthernet1/0/2] quit
[FW1] firewall zone untrust // 选择外网区域
[FW1-zone-untrust] add interface GigabitEthernet 1/0/2 // 将接口加入到此区域
# -------------------------------------------------------
<FW1> system-view
[FW1] interface GigabitEthernet 1/0/0
[FW1-GigabitEthernet1/0/0] ip address 192.168.1.1 255.255.255.0
[FW1-GigabitEthernet1/0/0] undo shutdown
[FW1-GigabitEthernet1/0/0] quit
[FW1] firewall zone trust // 将接口加入trust区域
[FW1-zone-trust] add interface GigabitEthernet 1/0/0
nat映射:
[USG6000V1]nat server 1 zone untrust protocol tcp global 59.79.100.101 www inside 10.1.4.1 www no-reverse //no-reverse代表可以配置多个映射表项,但只有单向映射,只能外部网络单向发起连接
[USG6000V1]nat server 2 zone untrust protocol tcp global 202.96.100.101 www inside 10.1.4. 1 www no-reverse //设置第二个出口的映射
[USG6000V1]firewall zonenamedianxin
[USG6000V1-zone-dianxin]set priority 5 //设置区域优先级
[USG6000V1-zone-dianxin]add interface g1/0/1
[USG6000V1]firewall zonenameliantong
[USG6000V1-zone-liantong]set priority2
[USG6000V1-zone-liantong]add interface g1/0/2
nat address-group cernet //地址池
mode pat //可以一对多
section 0 59.79.100.100 //地址池的地址 多个出口,设置多个地址池,设置nat策略
根据不同的目的网段映射不同的地址池:
nat-policy
rule name dianxin
source-zone trust
destination-zone untrust
destination-address 202.96.200.0 mask 255.255.255.0
action source-nat address-group dianxin
rule name cernet
source-zone trust
destination-zone untrust
destination-address 59.79.200.0 mask 255.255.255.0
action source-nat address-group cernet
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。