公司要和本地的广电公司进行业务合作。为此我们拉了一条100Mb的光纤专线。在此专线的我们这侧,设计要上一台cisco ASA 5520防火墙。这个设备比较普遍。用的比较多。只是有点时间没有动手配置了。网络结构大概如下:
要求:网络调通,让我们公司内部的服务器可以访问广电网。
本来应该很简单的事情。可能由于太少配置了。根据记忆配置cisco ASA 5520,竟然不通!天理何在啊!
cisco asa 5520配置:#这列出我自己的配置,默认配置不写。
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 172.31.87.130 255.255.255.192
!
interface GigabitEthernet0/1
nameif inside
security-level 100
ip address 172.18.20.1 255.255.255.0
global (outside) 1 interface
nat (inside) 1 172.18.0.0 255.255.0.0
route outside 0.0.0.0 0.0.0.0 172.31.87.129 1
route inside 172.16.18.0 255.255.255.0 172.18.20.254 1
测试:在ASA 5520上测试:
GX-FW-5520-02(config)# ping 172.31.87.129
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.31.87.129, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
GX-FW-5520-02(config)# ping 172.18.10.62
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.18.10.62, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
结果是ASA 5520到内外都通的。
在我们公司的服务器上测试看看:
[root@test-lvs02 ~]# ping 172.31.87.129
PING 172.31.87.129 (172.31.87.129) 56(84) bytes of data.
。。。。。。
不通,尼玛!这是怎么回事?
在我的印象里,这样配置就可以实现内部访问外部了。还要做什么配置吗?哎,老革命遇到新问题,想想办法吧。
在ASA 5520上启用debug icmp trace,看到:
GX-FW-5520-02(config)# ICMP echo request from inside:172.18.20.252 to outside:172.31.87.131 ID=25 seq=0 len=72
ICMP echo request translating inside:172.18.20.252/25 to outside:172.31.87.130/7795
ICMP echo reply from outside:172.31.87.129 to inside:172.31.87.130 ID=7795 seq=0 len=72
ICMP echo reply untranslating outside:172.31.87.129/7795 to inside:172.18.20.252/25
ICMP echo request from inside:172.18.20.252 to outside:172.31.87.130 ID=25 seq=1 len=72
ICMP echo request translating inside:172.18.20.252/25 to outside:172.31.87.130/7795
ICMP echo reply from outside:172.31.87.129 to inside:172.31.87.130 ID=7795 seq=1 len=72
ICMP echo reply untranslating outside:172.31.87.130/7795 to inside:172.18.20.252/25
ICMP echo request from inside:172.18.20.252 to outside:172.31.87.129 ID=25 seq=2 len=72
这不是典型的坑爹嘛?回来的ICMP数据包被阻止了。cisco啥时候要对回来的数据包做acl了?没有办法。添加吧。
access-list from_outside_in extended permit icmp any any
access-group from_outside_in in interface outside
再在内部的服务器上测试。通了。无奈啊!