一.图纸
二.命令
ciscoasa> en
Password:
ciscoasa# conf t
ciscoasa(config)# int e0/0
ciscoasa(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ciscoasa(config-if)# ip add 202.106.0.1 255.255.255.0
ciscoasa(config-if)# no sh
ciscoasa(config-if)# exit
ciscoasa(config)# int e0/1
ciscoasa(config-if)# nameif inside
INFO: Security level for "inside" set to 100 by default.
ciscoasa(config-if)# ip add 10.0.0.2 255.255.255.252
ciscoasa(config-if)# no sh
ciscoasa(config-if)# exit
ciscoasa(config)# int e0/2
ciscoasa(config-if)# nameif dmz
INFO: Security level for "dmz" set to 0 by default.
ciscoasa(config-if)# security-level 50
ciscoasa(config-if)# ip add 172.16.0.1 255.255.255.0
ciscoasa(config-if)# no sh
ciscoasa(config-if)# exit
ciscoasa(config)# route inside 192.168.1.0 255.255.255.0 10.0.0.1
ciscoasa(config)# route inside 192.168.2.0 255.255.255.0 10.0.0.1
R2#conf t
R2(config)#int f0/0
R2(config-if)#ip add 10.0.0.1 255.255.255.252
R2(config-if)#no sh
R2(config-if)#int f0/1
R2(config-if)#ip add 192.168.1.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int f1/0
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config-if)#exit
R2(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2
R3(config)#int f0/0
R3(config-if)#ip add 192.168.1.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#no ip routing
R3(config)#ip default-gateway 192.168.1.1
R3(config)#exit
R4(config)#int f0/0
R4(config-if)#ip add 192.168.2.2 255.255.255.0
R4(config-if)#no sh
R4(config-if)#exit
R4(config)#no ip routing
R4(config)#ip default-gateway 192.168.2.1
R4(config)#exit
web(config)#int f0/0
web(config-if)#ip add 172.16.0.100 255.255.255.0
web(config-if)#no sh
web(config-if)#exit
web(config)#no ip routing
web(config)#ip default-gateway 172.16.0.1
web(config)#exit
telnet(config)#int f0/0
telnet(config-if)#ip add 172.16.0.200 255.255.255.0
telnet(config-if)#no sh
telnet(config-if)#exit
telnet(config)#no ip routing
telnet(config)#ip default-gateway 172.16.0.1
telnet(config)#line vty 0 4
telnet(config-line)#password 123
telnet(config-line)#login
telnet(config-line)#exit
telnet(config)#enable password 456
telnet(config)#exit
R1(config)#int f0/0
R1(config-if)#ip add 202.106.0.2 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#no ip routing
R1(config)#ip default-gateway 202.106.0.1
R1(config)#line vty 0 4
R1(config-line)#password 123
R1(config-line)#login
R1(config-line)#exit
三.特殊命令及要求
防火墙nat 实验
1, 内网网段配置动态pat 将内网 192.168.1.0 网段映射到防火墙外网接口上
ciscoasa(config)# nat (inside) 1 192.168.1.0 255.255.255.0
ciscoasa(config)# global (outside) 1 interface
2,dmz 区域服务器做静态pat 将 两台服务器对应到一个外网接口的不同端口
static (dmz,outside) tcp 202.106.0.150 80 172.16.0.100 80
static (dmz,outside) tcp 202.106.0.150 23 172.16.0.200 23
access-list abc permit ip any host 202.106.0.150
access-group abc in int outside
3, 开启nat 控制
nat-control
4, 对内网网段192.168.2.0 或豁免 能够发访问外网
access-list bbs permit ip 192.168.2.0 255.255.255.0 host 202.106.0.2
nat (inside) 0 access-list bbs