01-31-2016 01:09 PM - edited 03-05-2019 03:14 AM
Looking for some guidance on the correct configuration for inbound NATs with various ports due to SIP requirements.
basically i have a free IP address out of my static external range - i don't want to add a dozen ip nat inside source static lines into my config.
I'm sure i should be able to create a nat line that references an ACL that will allow me to complete the above requirements - i don't know how this should 'look'
01-31-2016 01:52 PM
What kind of device do you have?
01-31-2016 10:58 PM
1941 router - one interface external, one internal. I'd like to have incoming nats and out going nats on then same, currently spare, ip address from then external range.
02-01-2016 12:32 AM
If a.b.c.d is the internal server address, and e.f.g.h is the public outside IP address, then just use:
ip nat inside source static a.b.c.d e.f.g.h
02-01-2016 12:33 AM
I would also tend to disable the SIP ALG with the below command. Your inbound ACL should only reference the public IP address.
no ip nat service sip udp port 5060
02-03-2016 07:07 AM
I think its a little more complicated that that -
I was thinking a little more like the below - I can have a static external ip address designated for SIP, but from inside I can be very specific about the outbound ports that I nat to the external ip.
Outside --> Inside:
ip nat pool SIP_OUT x.x.x.x x.x.x.x prefix-length 29
ip nat inside destination list SIP_OUT pool SIP overload
ip access-list extended SIP_OUT
permit ip host y.y.y.y any
Inside --> Outside:
ip nat inside source static y.y.y.y x.x.x.x route-map SIP
ip access-list extended SIP
permit udp host y.y.y.y eq 5060 any
permit udp host y.y.y.y range 40000 50000 any
permit udp host y.y.y.y eq 50700 any
permit udp host y.y.y.y eq 50800 any
permit udp host y.y.y.y eq 50900 any
route-map SIP permit 10
match ip address SIP
route-map SIP deny 20
02-03-2016 10:31 AM
Why would you want to do that? The 1:1 NAT is considerably simpler and will work perfectly.
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