10-25-2019 06:30 AM
Im trying to change the default SIP port 5060 to 5062, but the router seems to be rewriting it bac to 5060
I have set the telephone system and the SIP provider to use signalling port 5062 and then programmed the following on the router, and rebooted the router.
no ip nat service sip udp port 5060
no ip nat service sip tcp port 5060
ip nat service sip tcp port 5062
ip nat service sip udp port 5062
ip nat inside source list 10 interface Dialer1 overload
ip nat inside source static udp 192.168.1.2 5062 interface Dialer1 5062
However, the router keeps rewriting the port back to 5060 even tho everything has been changed to use 5062, and I don't know why.
sh ip nat trans
udp 5.2.114.XXX:5062 192.168.1.2:5062 88.215.63.169:5060 88.215.63.169:5060
udp 5.2.114.XXX:5062 192.168.1.2:5062 --- ---
sh ip nat detailed
Oct 24 19:35:51.286: NAT: o: udp (88.215.63.169, 5060) -> (Extn IP Ady, 5062) [64001]
Oct 24 19:35:51.290: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [64001]
Oct 24 19:35:51.290: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [18696]
Oct 24 19:35:51.290: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [18696]
Oct 24 19:35:51.322: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [64002]
Oct 24 19:35:51.322: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [64002]
Oct 24 19:35:51.326: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [18697]
Oct 24 19:35:51.326: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [18697]
Oct 24 19:35:51.350: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [64003]
Oct 24 19:35:51.350: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [64003]
Oct 24 19:35:51.350: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [18698]
Oct 24 19:35:51.350: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [18698]
Oct 24 19:35:51.378: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [64004]
Oct 24 19:35:51.378: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [64004]
Oct 24 19:35:51.378: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [18699]
Oct 24 19:35:51.382: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [18699]
Oct 24 19:35:51.458: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [64005]
Oct 24 19:35:51.458: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [64005]
Oct 24 19:35:51.458: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [18700]
Oct 24 19:35:51.458: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [18700]
Oct 24 19:35:51.518: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [64006]
Oct 24 19:35:51.518: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [64006]
Oct 24 19:35:51.522: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [18701]
Oct 24 19:35:51.522: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [18701]
Oct 24 19:35:51.590: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [64007]
Can anyone help with this.
10-25-2019 08:06 AM
Hello,
which platform and IOS is this on ?
What is the output of:
debug ip nat sip
I am not sure if:
ip nat service allow-multipart
is needed as well, try and add that to your configuration...
10-28-2019 03:28 AM
The ip nat service allow-multipart did not work.. I have tried this on various cisco routers with different IOS firmware and all preform exactly the same.
Cisco 1921 with IOS c1900-universalk9-mz.SPA.154-2.T.bin
Cisco 1921, with IOS c1900-universalk9-mz.SPA.157-3.M.bin
Cisco 887 with IOS c880data-universalk9-mz.157-3.M1.bin
I programmed a few access list on the inside and outside interfaces just to make sure that the telephone system was sending 5062 and the SIP provider was also sending 5062 which they are.
Extended IP access list SIP_IN
10 permit udp host 192.168.1.2 host 88.215.63.169 eq 5062 log (28 matches)
20 deny udp host 192.168.1.2 host 88.215.63.169 eq 5060 log
30 permit ip any any (473 matches)
Extended IP access list inboundfilters
40 permit udp 88.215.63.0 0.0.0.255 any eq 5062 log (424 matches)
However as you can see from the debug ip nat sip and the ip nat detailed the router is still rewriting the port to 5060
Debug ip nat sip
ct 27 13:33:49.009: NAT: SIP: [0] processing OPTIONS message
Oct 27 13:33:49.009: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:49.009: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:49.009: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:49.009: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:49.009: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:49.009: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:49.009: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:49.009: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:49.009: NAT: SIP: Contact header found
Oct 27 13:33:49.009: NAT: SIP: Trying to find expires parameter
Oct 27 13:33:49.009: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:49.009: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:49.009: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:49.505: NAT: SIP: [0] processing OPTIONS message
Oct 27 13:33:49.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:49.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:49.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:49.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:49.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:49.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:49.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:49.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:49.505: NAT: SIP: Contact header found
Oct 27 13:33:49.505: NAT: SIP: Trying to find expires parameter
Oct 27 13:33:49.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:49.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:49.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:50.505: NAT: SIP: [0] processing OPTIONS message
Oct 27 13:33:50.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:50.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:50.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:50.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:50.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:50.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:50.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:50.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:50.505: NAT: SIP: Contact header found
Oct 27 13:33:50.505: NAT: SIP: Trying to find expires parameter
Oct 27 13:33:50.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:50.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:50.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:51.273: %SEC-6-IPACCESSLOGRL: access-list logging rate-limited or missed 1 packet
Oct 27 13:33:51.273: %SEC-6-IPACCESSLOGP: list SIP_IN permitted udp 192.168.1.2(5060) -> 88.215.63.169(5062), 23 packets
Oct 27 13:33:51.273: %SEC-6-IPACCESSLOGDP: list inboundfilters denied icmp 88.215.57.113 -> 5.2.114.XXX (8/0), 25 packets
Oct 27 13:33:52.505: NAT: SIP: [0] processing OPTIONS message
Oct 27 13:33:52.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:52.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:52.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:52.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:52.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:52.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:52.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:52.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:52.505: NAT: SIP: Contact header found
Oct 27 13:33:52.505: NAT: SIP: Trying to find expires parameter
Oct 27 13:33:52.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:52.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:52.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:56.505: NAT: SIP: [0] processing OPTIONS message
Oct 27 13:33:56.505: NAT: SIP: [0] register:0 door_created:0
Oct 27 13:33:56.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:56.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:56.505: NAT: SIP: [0] register:0 door_created:1
Oct 27 13:33:56.505: NAT: SIP: [0] translated embedded address 192.168.1.2->5.2.114.XXX
Oct 27 13:33:56.505: NAT: SIP: [0] translate embedded port 5060->1042
Oct 27 13:33:56.505: NAT: SIP: [0] register:0 door_created:1
And from a Debug ip nat detailed
Oct 27 13:36:01.373: NAT: API parameters passed: src_addr:88.215.63.169, src_port:0 dest_addr:5.2.114.XXX, dest_port:0, proto:17 if_input:Dialer1 pak:86F90ED8 get_translated:1
Oct 27 13:36:01.373: ipnat_api_translated_address_and_port_common, out->in want IL,OL
Oct 27 13:36:01.373: NAT: API Failed to get Translated-Info from: (src-addr:88.215.63.169, src-port:0) (dest-addr:5.2.114.XXX, dest-port:0)
Oct 27 13:36:01.373: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5135]
Oct 27 13:36:01.377: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5135]
Oct 27 13:36:01.377: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22201]
Oct 27 13:36:01.377: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22201]
Oct 27 13:36:02.085: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5136]
Oct 27 13:36:02.085: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5136]
Oct 27 13:36:02.085: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22202]
Oct 27 13:36:02.841: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5137]
Oct 27 13:36:02.841: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5137]
Oct 27 13:36:02.845: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22203]
Oct 27 13:36:02.845: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22203]
Oct 27 13:36:03.417: NAT: API parameters passed: src_addr:79.137.68.86, src_port:0 dest_addr:5.2.114.XXX, dest_port:0, proto:6 if_input:Dialer1 pak:86F90ED8 get_translated:1
Oct 27 13:36:03.417: ipnat_api_translated_address_and_port_common, out->in want IL,OL
Oct 27 13:36:03.757: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5138]
Oct 27 13:36:03.757: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5138]
Oct 27 13:36:03.769: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22205]
Oct 27 13:36:03.769: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22205]
Oct 27 13:36:03.805: NAT*: o: tcp (169.55.191.104, 5938) -> (5.2.114.XXX, 57561) [24717]
Oct 27 13:36:03.805: NAT*: s=169.55.191.104, d=5.2.114.XXX->192.168.1.251 [24717]
Oct 27 13:36:03.861: NAT*: i: tcp (192.168.1.251, 57561) -> (169.55.191.104, 5938) [11228]
Oct 27 13:36:03.861: NAT*: s=192.168.1.251->5.2.114.XXX, d=169.55.191.104 [11228]
Oct 27 13:36:05.057: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5139]
Oct 27 13:36:05.057: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5139]
Oct 27 13:36:05.057: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22224]
Oct 27 13:36:05.057: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22224]
Oct 27 13:36:05.125: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5140]
Oct 27 13:36:05.129: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5140]
Oct 27 13:36:05.129: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22225]
Oct 27 13:36:05.129: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22225]
Oct 27 13:36:05.293: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5141]
Oct 27 13:36:05.297: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5141]
Oct 27 13:36:05.297: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22234]
Oct 27 13:36:05.297: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22234]
Oct 27 13:36:05.357: NAT: o: udp (88.215.63.169, 5060) -> (5.2.114.XXX, 5062) [5142]
Oct 27 13:36:05.357: NAT: s=88.215.63.169, d=5.2.114.XXX->192.168.1.2 [5142]
Oct 27 13:36:05.361: NAT: i: icmp (192.168.1.2, 5062) -> (88.215.63.169, 5060) [22235]
Oct 27 13:36:05.361: NAT: s=192.168.1.2->5.2.114.XXX, d=88.215.63.169 [22235]
10-28-2019 03:42 AM
Hello,
it could be that 5062 is reserved by the system. What is the output of:
sh ip nat portblock dynamic global
10-28-2019 05:51 AM
that command ""sh ip nat portblock"" is not valid on my 1921 router IOS.
10-28-2019 07:15 AM
Hello,
can you try and change your access list 10 to 101:
ip nat inside source list 10 interface Dialer1 overload
to
ip nat inside source list 101 interface Dialer1 overload
access-list 101 deny udp any any eq 5062
access-list 101 permit ip yournetwork any
So you basically exclude UDP port 5062 from being overloaded...
10-30-2019 06:29 AM
Programmed that up to deny the UDP 5062 from overloading, but its still exactly same.. the cisco router still changes the port back to 5060..
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide