序
演示视频点这
目的:
1.把本机当做pix的日志服务器记录日志
2.PC2能ping却不能telnet PC1
3.PC3能telnet却不能ping PC1
配置
网络拓扑图
log_server是桥接的本机(我用的虚拟机里的GNS3,所以这里相当于是我的虚拟机),GNS3桥接本机的方法网上有很多了,我就不写了。
设备配置
network device | interface | ip address | nameif | security level |
---|---|---|---|---|
PIX | E0 | 12.12.12.1 | inside | 100 |
PIX | E1 | 14.0.1.1 | dmz | 50 |
PIX | E2 | 15.0.1.1 | outside | 0 |
R1 | F0/0 | 14.0.1.2 | / | / |
R1 | F1/0 | 12.12.13.1 | / | / |
R2 | F0/0 | 15.0.1.2 | / | / |
R2 | F1/0 | 16.0.1.1 | / | / |
R2 | F2/0 | 16.0.2.1 | / | / |
log_server | loopback | 12.12.12.2 | / | / |
PC1 | F0/0 | 12.12.13.2 | / | / |
PC2 | F0/0 | 16.0.1.2 | / | / |
PC3 | F0/0 | 16.0.2.2 | / | / |
路由器R1配置
配置命令如下:
R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 14.0.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip address 12.12.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 14.0.1.1
R1(config)#end
路由器R2配置
配置命令如下:
R2#configure terminal
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 15.0.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ip address 16.0.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 2/0
R2(config-if)#ip address 16.0.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#ip route 33.33.33.0 255.255.255.0 15.0.1.1
R2(config)#end
PC1配置
配置命令如下:
PC1#configure terminal
PC1(config)#no ip routing
PC1(config)#ip default-gateway 12.12.13.1
PC1(config)#interface fastEthernet 0/0
PC1(config-if)#ip address 12.12.13.2 255.255.255.0
PC1(config-if)#no shutdown
PC1(config-if)#exit
PC1(config)#user 4ut15m password 4ut15m
PC1(config)#line vty 0 4
PC1(config-line)#login local
PC1(config-line)#end
PC1#
PC2配置
配置命令如下:
PC2#configure terminal
PC2(config)#no ip routing
PC2(config)#ip default-gateway 16.0.1.1
PC2(config)#interface fastEthernet 0/0
PC2(config-if)#ip address 16.0.1.2 255.255.255.0
PC2(config-if)#no shutdown
PC2(config-if)#end
PC3配置
配置命令如下:
PC3#configure terminal
PC3(config)#no ip routing
PC3(config)#ip default-gateway 16.0.2.1
PC3(config)#interface fastEthernet 0/0
PC3(config-if)#ip address 16.0.2.2 255.255.255.0
PC3(config-if)#no shutdown
PC3(config-if)#end
PC3#
防火墙PIX配置
配置命令如下:
pixfirewall> en
Password:
pixfirewall# configure terminal
pixfirewall(config)# interface e0
pixfirewall(config-if)# ip address 12.12.12.1 255.255.255.0
pixfirewall(config-if)# nameif inside
pixfirewall(config-if)# security-level 100
pixfirewall(config-if)# no shutdown
pixfirewall(config-if)# exit
pixfirewall(config)# interface e1
pixfirewall(config-if)# ip address 14.0.1.1 255.255.255.0
pixfirewall(config-if)# nameif dmz
pixfirewall(config-if)# security-level 50
pixfirewall(config-if)# no shutdown
pixfirewall(config-if)# exit
pixfirewall(config)# interface e2
pixfirewall(config-if)# ip address 15.0.1.1 255.255.255.0
pixfirewall(config-if)# nameif outside
pixfirewall(config-if)# security-level 0
pixfirewall(config-if)# no shutdown
pixfirewall(config-if)# exit
pixfirewall(config)# route dmz 12.12.13.0 255.255.255.0 14.0.1.2
pixfirewall(config)# route outside 16.0.0.0 255.0.0.0 15.0.1.2
pixfirewall(config)# static (dmz,outside) 33.33.33.1 12.12.13.2
pixfirewall(config)# access-list acl1 permit icmp host 16.0.1.2 host 33.33.33.1
pixfirewall(config)# access-list acl1 permit tcp host 16.0.2.2 host 33.33.33.1$
pixfirewall(config)# access-group acl1 in interface outside
pixfirewall(config)# logging host inside 12.12.12.2
pixfirewall(config)# logging trap informational
pixfirewall(config)# logging on
pixfirewall(config)# end
pixfirewall#