我刚刚安装了一个NEC PBX,它允许我使用SIP中继来提供VoIP服务。我的网关是运行8.4的Cisco ASA 5505,我只有一个公共/静态IP地址。
到目前为止,我的中继线正在注册,我可以打出电话,一切正常,但来电是沉默(两种方式)。 我假设它是因为UDP端口1024-1215不转发,也不是SIP(5060)。
我需要做的是转发1024-1215的UDP端口范围,但似乎我无法为UDP创build端口映射,或者在静态路由中为UDP定义一个范围的端口。 任何帮助正确的方向将不胜感激! (我被告知ASA 8.4将允许转发一系列的端口,所以我升级了,现在我有点失落了新的命令)
使用ASDM我给了它几次尝试,但这里是我的结果:
[OK] object network NEC_DSX object network NEC_DSX [ERROR] nat (inside,outside) static interface service udp 1024-1215 1024-1215 nat (inside,outside) static interface service udp 1024-1215 1024-1215 ^ ERROR: % Invalid input detected at '^' marker. I also tried: [OK] object network NEC_DSX object network NEC_DSX [ERROR] nat (inside,outside) static interface service udp 1024 1024 NAT unable to reserve ports. ------------------------ Here is my current config : ASA Version 8.4(4) ! hostname ciscoasa enable password 8Ry2YjIyt7RRXU24 encrypted passwd 2KFQnbNIdI.2KYOU encrypted names name 24.173.xxx.xxx StaticOutside description WAN IP ! interface Ethernet0/0 switchport access vlan 2 ! interface Ethernet0/1 ! interface Ethernet0/2 ! interface Ethernet0/3 ! interface Ethernet0/4 ! interface Ethernet0/5 ! interface Ethernet0/6 ! interface Ethernet0/7 ! interface Vlan1 nameif inside security-level 100 ip address 192.168.3.1 255.255.255.0 ! interface Vlan2 nameif outside security-level 0 ip address StaticOutside 255.255.255.252 ! boot system disk0:/asa844-k8.bin boot system disk0:/asa832-k8.bin ftp mode passive object network obj-192.168.3.5 host 192.168.3.5 object network obj_any subnet 0.0.0.0 0.0.0.0 object network NEC_DSX host 192.168.3.150 description NEC DSX SYSTEM access-list outside_access_in extended permit tcp any host 192.168.3.5 eq 3389 log disable pager lines 24 logging asdm informational mtu inside 1500 mtu outside 1500 icmp unreachable rate-limit 1 burst-size 1 asdm image disk0:/asdm-649-103.bin no asdm history enable arp timeout 14400 ! object network obj-192.168.3.5 nat (inside,outside) static interface service tcp 3389 3389 object network obj_any nat (inside,outside) dynamic interface access-group outside_access_in in interface outside route outside 0.0.0.0 0.0.0.0 24.173.100.85 1 timeout xlate 3:00:00 timeout pat-xlate 0:00:30 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02 timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00 timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00 timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute timeout tcp-proxy-reassembly 0:01:00 timeout floating-conn 0:00:00 dynamic-access-policy-record DfltAccessPolicy user-identity default-domain LOCAL http server enable http 192.168.3.0 255.255.255.0 inside no snmp-server location no snmp-server contact snmp-server enable traps snmp authentication linkup linkdown coldstart telnet timeout 5 ssh timeout 5 ssh key-exchange group dh-group1-sha1 console timeout 0 dhcpd auto_config outside ! dhcpd address 192.168.3.10-192.168.3.38 inside dhcpd dns 4.2.2.1 4.2.2.2 interface inside dhcpd enable inside ! threat-detection basic-threat threat-detection statistics host threat-detection statistics access-list no threat-detection statistics tcp-intercept webvpn ! class-map inspection_default match default-inspection-traffic ! ! policy-map type inspect dns preset_dns_map parameters message-length maximum client auto message-length maximum 512 policy-map global_policy class inspection_default inspect dns preset_dns_map inspect ftp inspect h323 h225 inspect h323 ras inspect rsh inspect rtsp inspect esmtp inspect sqlnet inspect skinny inspect sunrpc inspect xdmcp inspect sip inspect netbios inspect tftp inspect ip-options class class-default user-statistics accounting ! service-policy global_policy global prompt hostname context no call-home reporting anonymous Cryptochecksum:85d3bff9e7eb561bf8ee4f27b11a6cf4 : end
您不必显式转发RTP端口(> 1024),因为您已经开启了sip inspect 。 当SIP INVITE通过时,路由器将在呼叫期间打开适当的RTP端口。
就NATing SIP而言,你缺lessNAT命令和访问列表条目:
! this should be tightened to allow traffic only from your telephone company, or ! people with bad intent will happily place international calls on your account access-list outside_access_in extended permit udp any host 192.168.3.150 eq 5060 ! nat 5060 to 5060 object network NEC_DSX nat (inside,outside) static interface service udp 5060 5060
虽然不需要 ,但转发范围的正确语法是:
object service rtp-1024-1215 service udp source range 1024 1215 object network NEC_DSX_RTP host 192.168.3.150 nat (inside,outside) static interface service rtp-1024-1215 rtp-1024-1215