真机调试H3C防火墙,通了就跑命令代码
原始命令
interface GigabitEthernet1/0/0
description wan
interface GigabitEthernet1/0/2
description To_PC
security-zone name Management
undo import interface GigabitEthernet1/0/0
undo import interface GigabitEthernet1/0/2
quit
security-zone name Trust
import interface GigabitEthernet1/0/2
security-zone name Untrust
import interface GigabitEthernet1/0/0
interface GigabitEthernet1/0/0
description wan
ip address dhcp-alloc
interface GigabitEthernet1/0/2
description To_PC
ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet1/0/0
description wan
nat outbound
dhcp server ip-pool net10
gateway-list 192.168.10.1
network 192.168.10.0 mask 255.255.255.0
dns-list 114.114.114.114
security-policy ip
rule 0 name any
action pass
更改命令
interface GigabitEthernet1/0/2
description wan
interface GigabitEthernet1/0/4
description To_PC
security-zone name Management
undo import interface GigabitEthernet1/0/2
undo import interface GigabitEthernet1/0/4
quit
security-zone name Trust
import interface GigabitEthernet1/0/4
security-zone name Untrust
import interface GigabitEthernet1/0/2
interface GigabitEthernet1/0/2
description wan
ip address dhcp-alloc
interface GigabitEthernet1/0/4
description To_PC
ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet1/0/2
description wan
nat outbound
dhcp server ip-pool net10
gateway-list 192.168.10.1
network 192.168.10.0 mask 255.255.255.0
dns-list 114.114.114.114
security-policy ip
rule 0 name any
action pass
quit
quit
save force
测试端口IP
interface GigabitEthernet1/0/5
description To_PC2
ip address 192.168.8.1 255.255.255.0