展开

华为防火墙配置指南

发布于 2021-10-20 22:17:14     浏览 424

华为防火墙配置指南

问题解析:

【】

1、 1.步骤一.基本配置与IP编址 2、 首先给三个路由器配置地址信息。 3、 [Huawei]sysname R1 4、 [R1]interface g0/0/1 5、 [R1-GigabitEthernet0/0/1]ip add 10.0.10.124 6、 [R1-GigabitEthernet0/0/1]desc this portconnect to S1-G0/0/1 7、 [R1-GigabitEthernet0/0/1]interfaceloopback0 8、 [R1-LoopBack0]ip add 10.0.1. 24 9、 [R1-LoopBack0]q 10、 [Huawei]sysname R2 11、 [R2]interface g0/0/1 12、 [R2-GigabitEthernet0/0/1]ip add 10.0.20.224 13、 [R2-GigabitEthernet0/0/1]desc this portconnect to S1-G0/0/2 14、 [R2-GigabitEthernet0/0/1]interfaceloopback0 15、 [R2-LoopBack0]ip add 10.0.2. 24 16、 [R2-LoopBack0]q 17、 [Huawei]sysname R3 18、 [R3]interface g0/0/1 19、 [R3-GigabitEthernet0/0/1]ip add 10.0.30.324 20、 [R3-GigabitEthernet0/0/1]desc this portconnect to S1-G0/0/3 21、 [R3-GigabitEthernet0/0/1]interfaceloopback0 22、 [R3-LoopBack0]ip add 10.0.3. 24 23、 [R3-LoopBack0]q 24、 给防火墙配置地址时,G0/0/1配置10.0.20.254/ 25、 2[SRG]sysname FW 26、 13:06:032014/07/08 27、 [FW]interface g0/0/1 28、 13:06:302014/07/08 29、 [FW-GigabitEthernet0/0/1]ip add 10.0.20.25424 30、 13:07:012014/07/08 31、 [FW-GigabitEthernet0/0/1]desc this portconnect to S1-G0/0/22 32、 13:07:522014/07/08 33、 [FW-GigabitEthernet0/0/1]interface g0/0/0 34、 13:08:232014/07/08 35、 [FW-GigabitEthernet0/0/0]s this 36、 13:08:312014/07/08 37、 # 38、 interface GigabitEthernet0/0/0 39、 alias GE0/MGMT 40、 ipaddress 192.168.0.1 255.255.255.0 41、 dhcpselect interface 42、 dhcpserver gateway-list 192.168.0.1 43、 # 44、 return 45、 [FW-GigabitEthernet0/0/0]undo ip add 46、 13:08:422014/07/08 47、 Info: The DHCP server configuration on thisinterface will be deleted. 48、 [FW-GigabitEthernet0/0/0]display this 49、 13:08:462014/07/08 50、 # 51、 interface GigabitEthernet0/0/0 52、 alias GE0/MGMT 53、 # 54、 return 55、 [FW-GigabitEthernet0/0/0]ip add 10.0.10.25424 56、 13:09:292014/07/08 57、 [FW-GigabitEthernet0/0/0]desc this portconnect to S1-G0/0/21 58、 13:10:052014/07/08 59、 [FW-GigabitEthernet0/0/0]interface G0/0/2 60、 13:10:152014/07/08 61、 [FW-GigabitEthernet0/0/2]ip add 10.0.30.25424 62、 13:10:282014/07/08 63、 [FW-GigabitEthernet0/0/2]desc this portconnect to S1-G0/0/23 64、 13:10:532014/07/08 65、 [FW-GigabitEthernet0/0/2]q 66、 2.交换机上需要按照需求定义vlan 67、 [Huawei]sysname S1 68、 [S1]vlan batch 11 to 13 69、 Info: This operation may take a fewseconds. Please wait for a moment...done. 70、 [S1]interface g0/0/1 71、 [S1-GigabitEthernet0/0/1]port link-typeaccess 72、 [S1-GigabitEthernet0/0/1]port default vlan11 73、 [S1]interface g0/0/2 74、 [S1-GigabitEthernet0/0/2]port link-typeaccess 75、 [S1-GigabitEthernet0/0/2]port default vlan12 76、 [S1-GigabitEthernet0/0/2]interface g0/0/3 77、 [S1-GigabitEthernet0/0/3]port link-typeaccess 78、 [S1-GigabitEthernet0/0/3]port default vlan13 79、 [S1-GigabitEthernet0/0/3]interface g0/0/21 80、 [S1-GigabitEthernet0/0/21]port link-typeaccess 81、 [S1-GigabitEthernet0/0/21]port default vlan11 82、 [S1-GigabitEthernet0/0/21]interface g0/0/22 83、 [S1-GigabitEthernet0/0/22]port link-typeaccess 84、 [S1-GigabitEthernet0/0/22]port default vlan12 85、 [S1-GigabitEthernet0/0/22]interface g0/0/23 86、 [S1-GigabitEthernet0/0/23]port link-typeaccess 87、 [S1-GigabitEthernet0/0/23]port default vlan13 88、 3.步骤二.将接口配置到安全区域 89、 防火墙默认有四个区域,分别是“local”、“trust"、“untrust”、“dmz”。 90、 实验中我们用到“trust”、'untrust"、“dmz”三个区域。将G0/0/0加入untrust区域、g/0/0/2加入dmz和g/0/0/1加入trust。 91、 [FW]firewall zone trust 92、 13:45:312014/07/08 93、 [FW-zone-trust]s this 94、 13:45:352014/07/08 95、 # 96、 firewall zone trust 97、 setpriority 85 98、 addinterface GigabitEthernet0/0/0 99、 # 100、 return 101、 [FW-zone-trust]undo add inter 102、 [FW-zone-trust]undo add interface g0/0/0 103、 13:46:012014/07/08 104、 [FW-zone-trust]add interface g0/0/1 105、 13:46:222014/07/08 106、 [FW-zone-trust]firewall zone untrust 107、 [FW-zone-untrust]add interface g0/0/0 108、 13:47:242014/07/08 109、 [[FW-zone-untrust]firewall zone dmz 110、 13:48:062014/07/08 111、 [FW-zone-dmz]add interface g0/0/2 112、 13:48:13 2014/07/08 113、 [FW-zone-dmz]q 114、 4. 默认情况下,防火墙并不允许出local区域外的其它区域之间进行通信。为了便于验证配置的正确性,我们首先将防火墙区域之间的默认过滤规则配置为允许所有区域间通信。配置完成后在FW设备上测试连通性。 115、 [FW]firewall packet-filter default permitall 116、 13:51:192014/07/08 117、 Warning:Setting the default packetfiltering to permit poses security risks. You 118、 are advised to configure the securitypolicy based on the actual data flows. Are 119、 you sure you want to continue?[Y/N]y 120、 [FW]ping -c 1 10.0.10.1 121、 13:51:562014/07/08 122、 PING 10.0.10.1: 56 data bytes,press CTRL_C to break 123、 Reply from 10.0.10.1: bytes=56 Sequence=1 ttl=255 time=90 ms 124、 ---10.0.10.1 ping statistics --- 125、 1packet(s) transmitted 126、 1packet(s) received 127、 0.00% packet loss 128、 round-trip min/avg/max = 90/90/90 ms 129、 [FW]ping -c 1 10.0.20.2 130、 13:52:082014/07/08 131、 PING 10.0.20.2: 56 data bytes,press CTRL_C to break 132、 Reply from 10.0.20.2: bytes=56 Sequence=1 ttl=255 time=400 ms 133、 ---10.0.20.2 ping statistics --- 134、 1packet(s) transmitted 135、 1packet(s) received 136、 0.00% packet loss 137、 round-trip min/avg/max = 400/400/400 ms 138、 [FW]ping -c 1 10.0.30.3 139、 13:52:182014/07/08 140、 PING 10.0.30.3: 56 data bytes,press CTRL_C to break 141、 Reply from 10.0.30.3: bytes=56 Sequence=1 ttl=255 time=410 ms 142、 ---10.0.30.3 ping statistics --- 143、 1packet(s) transmitted 144、 1packet(s) received 145、 0.00% packet loss 146、 round-trip min/avg/max = 410/410/410 ms 147、 5.步骤三.配置静态路由,实现网络的连通性在R2和R3上配置缺省路由,在FW上配置明确的静态路由,实现三个loopback0接口之间的通信。R1无需定义缺省路由,原因是其作为internet设备,他不需要知道内部和DMZ区域的私有网络信息。[R2]ip route-static 0.0.0.0 0 10.0.20.254 148、 [R3]ip route-static 0.0.0.0 0 10.0.30.254 149、 [FW]ip route-static 10.0.1.0 24 10.0.10.1 150、 13:58:262014/07/08 151、 [FW]ip route-static 10.0.2.0 24 10.0.20.2 152、 13:58:402014/07/08 153、 [FW]ip route-static 10.0.3.0 24 10.0.30.3 154、 13:58:522014/07/08 155、 在防火墙上测试与10.0.1.0、10.0.2.0、10.0.3.0之间的连通性。[FW]ping -c 1 10.0.14:00:182014/07/08 156、 PING 10.0.1.: 56 data bytes,press CTRL_C to break 157、 Reply from 10.0.1.: bytes=56 Sequence=1 ttl=255 time=80 ms 158、 ---10.0.1. ping statistics --- 159、 1packet(s) transmitted 160、 1packet(s) received 161、 0.00% packet loss 162、 round-trip min/avg/max = 80/80/80 ms 163、 [FW]ping -c 1 10.0.14:00:252014/07/08 164、 PING 10.0.2.: 56 data bytes,press CTRL_C to break 165、 Reply from 10.0.2.: bytes=56 Sequence=1 ttl=255 time=170 ms 166、 ---10.0.2. ping statistics --- 167、 1packet(s) transmitted 168、 1packet(s) received 169、 0.00% packet loss 170、 round-trip min/avg/max = 170/170/170 ms 171、 [FW]ping -c 1 10.0.14:00:292014/07/08 172、 PING 10.0.3.: 56 data bytes,press CTRL_C to break 173、 Reply from 10.0.3.: bytes=56 Sequence=1 ttl=255 time=110 ms 174、 ---10.0.3. ping statistics --- 175、 1packet(s) transmitted 176、 1packet(s) received 177、 0.00% packet loss 178、 round-trip min/avg/max = 110/110/110 ms 179、 目前配置下,所有区域之间可以通讯,不被检查。但是由于当前尚未定义NAT,外部区域不能与内部和DMZ区域相互访问。 180、 6.步骤四.配置区域间的安全过滤配置从Trust区域的部分网段10.0.2.3发往Untrust区域的数据包被放行。从Untrust区域发往DMZ目标服务器10.0.3.的telnet请求被放行。[FW]firewall session link-state check 181、 [FW]policy interzone trust untrust outbound 182、 [FW-policy-interzone-trust-untrust-outbound]policy0 183、 14:06:572014/07/08 184、 [FW-policy-interzone-trust-untrust-outbound-0]policysource 10.0.2.0 0.0.0.255 185、 14:07:182014/07/08 186、 [FW-policy-interzone-trust-untrust-outbound-0]actionpermit 187、 14:07:312014/07/08 188、 [FW-policy-interzone-trust-untrust-outbound-0]q 189、 14:07:402014/07/08 190、 [FW-policy-interzone-trust-untrust-outbound]q 191、 14:07:402014/07/08 192、 ]policy interzone dmz untrust inbound 193、 14:09:012014/07/08 194、 [FW-policy-interzone-dmz-untrust-inbound]policy0 195、 14:09:082014/07/08 196、 [FW-policy-interzone-dmz-untrust-inbound-0]policydestination 10.0.3. 0 197、 14:09:372014/07/08 198、 [FW-policy-interzone-dmz-untrust-inbound-0]policyservice service-set telnet 199、 [FW-policy-interzone-dmz-untrust-inbound-0]actionpermit 200、 14:09:552014/07/08 201、 [FW-policy-interzone-dmz-untrust-inbound-0]q 202、 14:09:552014/07/08 203、 7.步骤五.配置Easy-Ip,实现Trust区域到Untrust区域的访问。配置使用Easy-IP,进行NAT源地址转换。并且将NAT与接口进行绑定。[FW-nat-policy-interzone-trust-untrust-outbound]policy0 204、 14:14:002014/07/08 205、 [FW-nat-policy-interzone-trust-untrust-outbound-0]policysource 10.0.2.0 0.0.0.2 206、 55 207、 14:14:262014/07/08 208、 [FW-nat-policy-interzone-trust-untrust-outbound-0]actionsource-nat 209、 14:14:372014/07/08 210、 [FW-nat-policy-interzone-trust-untrust-outbound-0]easy-ipg0/0/0 211、 14:14:512014/07/08 212、 [FW-nat-policy-interzone-trust-untrust-outbound-0]q 213、 配置完成后,验证Trust区域与Untrust区域之间的访问是否正常。 214、 <R2>ping 10.0.PING 10.0.1.: 56 data bytes,press CTRL_C to break 215、 Request time out 216、 Request time out 217、 Request time out 218、 Request time out 219、 Request time out 220、 ---10.0.1. ping statistics --- 221、 5packet(s) transmitted 222、 0packet(s) received 223、 100.00% packet loss 224、 <R2>ping -a 10.0.2. 10.0.PING 10.0.1.: 56 data bytes,press CTRL_C to break 225、 Reply from 10.0.1.: bytes=56 Sequence=1 ttl=254 time=220 ms 226、 Reply from 10.0.1.: bytes=56 Sequence=2 ttl=254 time=100 ms 227、 Reply from 10.0.1.: bytes=56 Sequence=3 ttl=254 time=100 ms 228、 Reply from 10.0.1.: bytes=56 Sequence=4 ttl=254 time=120 ms 229、 Reply fr

相关推荐

猜你可能喜欢

点击加载更多