cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
685
Views
0
Helpful
3
Replies

forward multiple ports on Cisco 1921

DriverCiscoPL
Level 1
Level 1

Hello,
I have a PBX Asterisk server, which is behind NAT, a Cisco 1921 router.
I want to forward multiple ports to it but I found that it is not as easy as in linux using iptables.
I thought this command would be appropriate:

ip nat inside source static udp 172.23.16.20 10000-20000 78.xx.xx.117 10000-20000 extendable no-payload

But the problem is the port range is not supported. Is there any other way to accomplish this?

3 Replies 3

Hello,

 

I think for UDP, your only option is to use a single line for each port, unfortunately...

 

ip nat inside source static udp 172.23.16.20 10000 78.xx.xx.117 10000 extendable no-payload

ip nat inside source static udp 172.23.16.20 10001 78.xx.xx.117 10001 extendable no-payload

ip nat inside source static udp 172.23.16.20 10002 78.xx.xx.117 10002 extendable no-payload

.

.

.

 

 

10000 lines, uhm maybe it's time to change router? Does any new device supports multiple ports forwarding in one line?

Hello,

 

check the post below for a Python script you can use to generate the entries...

 

https://community.cisco.com/t5/routing/port-forward-multiple-ranges-of-udp-ports-under-the-same-wan-ip/td-p/4085831

Review Cisco Networking for a $25 gift card