Cisco – UDP Port Forwarding Range

cisconat;sipudpvoip

We just purchased a cisco 3825 router running IOS 15.1. The slice of the
topology in question is as follows:

            RTP (8000-20000)            RTP (8000-20000)
192.168.2.1 <--------------> 192.168.2.5 <----------> 192.168.2.10
   (Router)                  (SIP Proxy)             (Media Server)

What we are trying to accomplish is to have the UDP range 8000-20000 forwarded
from the net to our SIP proxy 192.168.2.5. Also, our SIP proxy forwards
RTP traffic in the same range to our media server 192.168.2.10. The links
between the different servers, and the outside world are bi-directional.

Scouring the net there are some mixed reports on whether UDP port
forwarding using a range is possible. Can we please have a definitive answer if the following will work in getting RTP traffic to 192.168.2.5:

ip nat pool voip-rtp 192.168.2.5 192.168.2.5 netmask 255.255.255.0 type rotary
ip nat inside destination list 114 pool voip-rtp
ip route 0.0.0.0 0.0.0.0 Dialer0

Finally, will we need another rule for the internal routing of RTP traffic (ie, 192.168.2.5<—->192.168.2.10)?

Update – Working Route Map for SIP RTP UDP Range

access-list 130 permit udp any any range 8000 20000
route-map voip-rtp permit 1
match ip address 130
ip nat inside source static <private ip> <public ip> route-map voip-rtp

Best Answer

Try using a route map in the nat statement instead of the extended access list 114. The route map will match the extended access list 114.

Route-maps enable you to match traffic using source ip, destination ip, and tcp/udp ports, interfaces, etc ...

You define your criteria in the extended access-list 114 (I see it's already configured in your question).

Then you configure :

route-map RR permit 10
match ip address 114

ip nat inside destination route-map RR pool voip-rtp << replace your nat with this

More details and configuration examples for NAT with route-maps in : http://www.ciscopress.com/articles/article.asp?p=174107&seqNum=5