NAT Configuration - DefiantCoder/Tech-Journals GitHub Wiki

The web server is using the Private IP of 10.0.0.2

image

Configuration of Router Interfaces:

Configure interfaces on Router 1 (R1):

Router>enable

Router#configure terminal

Router(config)#hostname R1 your hostname here

R1(config)#interface fastethernet 0/0 input which port to use

R1(config-if)#ip address 10.0.0.1 255.0.0.0 input your address and Subnet mask

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface serial 0/0/0

R1(config-if)#ip address 20.0.0.2 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#exit

Configure Interfaces on Router 0

(R0)Router>enable

Router#configure terminal

Router(config)#hostname R0 your hostname here

R0(config)#interface fastethernet 0/0

R0(config-if)#ip address 30.0.0.1 255.0.0.0 input your address and Subnet mask

R0(config-if)#no shutdown

R0(config-if)#exit

R0(config)#interface serial 0/0/0

R0(config-if)#ip address 20.0.0.1 255.0.0.0

R0(config-if)#clock rate 64000

R0(config-if)#bandwidth 64

R0(config-if)#no shutdown

R0(config-if)#exit

Configure Routing

Router 1

R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.1

Router 0

R0(config)#ip route 50.0.0.0 255.0.0.0 20.0.0.2

Configuring Static NAT ### ( ex on router 1)

Define "Inside" and "Outside" on your NAT interfaces:

This will create a route from 10.0.0.2 (the web server private IP) to the 30.0.0.0 network (10.0.0.2 is the server and 30.0.0.0 is the network the computers are attached to)

R1(config)#interface fastEthernet 0/0

R1(config-if)#ip nat inside

R1(config-if)#exit

R1(config)#interface serial 0/0/0

R1(config-if)#ip nat outside

R1(config-if)#exit

Create the Static Rule:

R1(config)#ip nat inside source static 10.0.0.2 50.0.0.1 (50.0.0.1 is the static "mapping address of the **Public **IP address for the server)