NAT: default host to route incoming calls to ?

Aug 24, 2009 4 Replies

Say I have something like:



ip nat inside source static tcp 10.0.0.11 25 interface Dialer1 25 ip nat inside source static tcp 10.0.0.50 80 interface Dialer1 80


Is there some catch all "ip nat inside" command that would allow me to route all incoming calls to ports not defined above to one host (say



10.0.0.20) ?

in other words, port 25 goes to 10.0.0.11, port 80 goes to 10.0.0.50 and everything else goes to 10.0.0.20 ?



Or would I have to enter 32768 "ip nat inside" commands to list every possible port combination ?



Also, while I am at it, is there a trick to specify port ranges. For instance, anything in the 6000-6999 port range would go to 10.0.0.21 ?


I would think that :- ip nat inside source static tcp 10.0.0.11 25 interface Dialer1 25 ip nat inside source static tcp 10.0.0.50 80 interface Dialer1 80 ip nat inside source static tcp 10.0.0.20 interface Dialer1

would do the job.

Not 100% though.

I don't think so for static nat.

NAT Default Inside Server

formatting link

ip nat inside source static tcp 10.0.0.11 25 interface Dialer1 25 ip nat inside source static tcp 10.0.0.50 80 interface Dialer1 80 ip nat inside source static tcp 10.0.0.20 interface Dialer1

I meant for the last line - ip nat inside source static 10.0.0.20 interface Dialer1

obviously - sorry.

I had no idea it was called Nat Default Inside Server.

On the cisco page pointed to by Martin it says

  1. ip nat inside source static local-ip interface type number
  2. ip nat inside source static tcp local-ip local-port interface type number global-port

This puts the more general statement *before* the more specific so maybe the order is not important and it magically uses the more specific first if there is a match. No idea.

I wish Cisco would spell out details like this in the documentation.

I think the order of the "ip nat inside.." cannot be important, as the IOS changes the order every time you write-out the config and reboot the router.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required