10-26-2014 10:58 PM - edited 03-05-2019 12:02 AM
Hi,
I am trying to do a specific task and not being able to figure out what I need to do. Essentially, I would like the Cisco IOS router (3945) to change all DNS traffic going outbound, to use port 54 instead of the standard port 53.
Setup is very simple. One inside Interface and One Outside interface. Internal addressing on the inside with PAT for internet access. I would like that whenever an internal client makes a DNS request. When the router forwards that to the DNS server on the internet, it should send it to port 54 instead of 53.
Appreciate the help.
10-27-2014 04:19 AM
"When the router forwards that to the DNS server on the internet, it should send it to port 54 instead of 53."
Do you control the DNS server on the internet that you're wanting to forward to? If not, you'll break DNS for your users...
Outside of that, this is more than likely going to need to happen with natting and your internal DNS server (I'm assuming that you have a separate server). You'll need to port translate from that server to 54:
Server IP: 192.168.1.50
ip nat inside source static udp 192.168.1.50 53 x.x.x.x 54
HTH,
John
10-28-2014 03:31 AM
Thanks for the comment. I was under the impression that while using NAT, it should be more like ip nat OUTSIDE source static, since traffic is flowing from the inside interface to the outside interface.
Am I correct in that understanding?
10-28-2014 03:51 AM
It's based on where you're going to see the traffic from. If you want to translate inside -> outside, you'll use "ip nat inside". Outside would be when you're wanting to translate an outside source to something else internal.
*Edit*
It also depends on what interfaces you have labeled as "ip nat outside" and "ip nat inside".
ip nat outside source list:
translates the source of the IP packets that are traveling outside to inside
translates the destination of the IP packets that are traveling inside to outside
ip nat inside source list:
translates the source of IP packets that are traveling inside to outside
translates the destination of the IP packets that are traveling outside to inside
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