Sunday, December 20, 2009

Howto forward port on Cisco Router

Hi, in this short article I will demonstrate a way to configure port forwarding on your Cisco router.

This is our network topology, let's assume we want to allow anyone from the WAN side to connect to our web server (192.168.0.8) running Apache on port 80, the web server is located at a seperate DMZ segment (192.168.0.0/24):

This is how the general configuration will look like:

router(conf)#ip nat inside source "protocol" "internal IP" "internal port" interface "interface type" "external port"

So in our case the configuration will look like this:

router(conf)#ip nat inside source tcp 192.168.0.8 80 interface serial 0 80

Don't forget to apply a proper access list so the connections from the WAN side will not be blocked, I suggest using an extended access list to limit the connections only to the specific host in the DMZ.

No comments: