Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

NAT changing IP source

Hi all,

What would be the best way to configure NAT on Cisco IOS in such a way that when a packet arrives on the outside of my router, it is redirected to an internal host but changing the source IP? Does anyone have a similar IOS configuration?

Thanks in advance.

VIP Purple

NAT changing IP source


You can use ip nat outside command to translate the outside ip to an internel ip address., this will nat translate in both directions:


outside global addresss -

inside local -

ip nat outside static




Please don't forget to rate any posts that have been helpful. Thanks.

NAT changing IP source

just to add to the above post

lets say you have the folowing scenario


and you want to be seen by LAN as

what you can do it

in router1

ip nat outside static

you need a static for the to point to Router inorder for the NAT outside to work

ip route

inter x/x 

ip nat inside

inter x/x  -- connected to R2

ip nat outside

hope this help

if helpful rate

Community Member

NAT changing IP source

What if I need to "hide" every public IP addresses from an internal host?

What I need is basically a NAT but when any public IP reaches my router's outside on port 80/tcp, I need the connection to be NATed to an internal host on the same destination port but also changing the *source* address.


NAT changing IP source


for example;

LAN ( ----> (Gi0/0 ip: (Gi0/1 ip: ------> WAN

Web Server ip :

you can use config below;

#conf t

(config)# int gi0/0

(config-if)#desc LAN

(config-if)#ip addr

(config-if)#ip nat inside


(config)#int gi0/1

(config-if)#desc WAN

(config-if)#ip addr

(config-if)#ip nat outside


(config)#access-list 10 permit

(config)#ip nat inside source list 10 int gi0/1 overload

(config)#ip nat inside source static tcp 80 int gi0/1 80





NAT changing IP source

do you mean you have internal server with public IP and confugured internally with private IP you want to do nat for it on port tcp 80 ?

and in addition al the source IPs confign from outside has to be changed to somthing private ?

if yes you can use th ebelow example

server IP

server public IP is

ip nat inside source static tcp 80  80

for outside soruce address to be translated to any private address lets say

access-list 100 permit tcp any host

ip nat pool pool1 netmask

ip nat outside source list 100 pool pool1 add-route

you need a static route fo rth edummy pravte address point either to the exit interface or to your ISP next hope

ip aroute interface fa0/1


ip route

int fa0/0

ip nat inside

int fa0/1

ip nat outside

hope this help

if helpful rate

CreatePlease to create content