云计算专业防火墙NAT实验:
拓扑图如图所示:
配置命令如下:
LSW2:
system-view
vlan batch 10 20 30 100
interface g0/0/1
port link-type access
port default vlan 10
interface g0/0/10
port link-type access
port default vlan 20
interface g0/0/20
port link-type access
port default vlan 30
interface g0/0/24
port link-type access
port default vlan 100
interface vlan 100
ip address 192.168.100.1 30
interface vlan 10
ip address 192.168.6.254 24
interface vlan 20
ip address 192.168.16.254 24
interface vlan 30
ip address 192.168.26.254 24
ospf
area 0
network 192.168.6.0 0.0.0.255
network 192.168.16.0 0.0.0.255
network 192.168.26.0 0.0.0.255
network 192.168.100.0 0.0.0.3
AR1:
system-view
interface g0/0/1
ip address 22.22.6.254 24
interface g0/0/2
ip address 33.33.6.254 24
interface g0/0/0
ip address 11.11.6.6 29
FW:
system-view
interface g1/0/0
ip address 192.168.100.2 30
service-manage ping permit
interface g1/0/2
ip address 11.11.6.1 29
service-manage ping permit
interface g1/0/1
ip address 10.10.6.254 24
service-manage ping permit
interface g0/0/0
service-manage all permit
ospf
area 0
network 10.10.6.0 0.0.0.255
network 192.168.100.0 0.0.0.3
firewall zone name trust
add interface g1/0/0
firewall zone name dmz
add interface g1/0/1
firewall zone name untrust
add interface g1/0/2
security-policy
rule name trust-untrust
source-zone trust
destination-zone untrust
service any
action permit
nat-policy
rule name easy-ip-nat
source-zone trust
destination-zone untrust
action source-nat easy-ip
security-policy
rule name unt-dmz
source-zone untrust
destination-zone dmz
service ftp http
action permit
ip route-static 0.0.0.0 0.0.0.0 11.11.6.6
ip route-static 0.0.0.0 0.0.0.0 192.168.100.2
nat server ftp_nat protocol tcp global 11.11.6.2 ftp inside 10.10.6.10 ftp
nat server http_nat protocol tcp global 11.11.6.2 www inside 10.10.6.20 www
各PC机和Client、Server的配置:
菜菜的代码,希望能够帮助到你哟!