Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Cisco IOS 12.x, what command can I use to redirect all ports (udp and tcp) to an internal server?

I've set up a fw behind my router, rather than specify each port to nat on my router, I just want to send everything to my fw. So, instead of:

ip nat inside source static tcp 192.168.28.29 22 x.x.x.x 22 extendable
ip nat inside source static tcp 192.168.28.29 80 x.x.x.x 80 extendable

I need something for all, like:

ip nat inside source static tcp 192.168.28.29 x.x.x.x 80 extendable

Note: x.x.x.x is my external IP address.

I tried:

ip nat in source static 192.168.28.29 in gi0/0

But that doesn't seem to be working.

share|improve this question
    
So if you're wanting a 1 to 1 relationship between an external IP NAT'd to an internal IP, why wouldn't you just connect the firewall directly to the Internet connection and give it an external IP address? –  SpacemanSpiff Feb 16 '12 at 16:34
    
Because the router is my gateway and also has a hardware vpn back to the office, plus my fw in this case is shorewall running on linux. –  Clayton Dukes Feb 16 '12 at 16:39
1  
Hmm, seems I am a victim of my own stupidity :-) ip nat in source static 192.168.28.29 in gi0/0 Does, indeed work. I forgot to disable the inside fw for testing! Nothing to see here folks, move along... –  Clayton Dukes Feb 16 '12 at 16:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.