Page 1 of 1

nat question

Posted: Mon Oct 07, 2019 3:40 pm
by ce3msb
hi, i have next scenario

one interface, 2 ip public, 2 web server inside lan, how i can make a nat port forwarding for each web server, i mean:

wan ip 1------web server 1
wan ip 2-----web server 2

remenber only use 1 interface.
regards from chile.

Re: nat question

Posted: Mon Oct 07, 2019 4:00 pm
by IPANetEngineer
Here is an example of forwarding port 80 on two different IPs using 203.0.113.0/24 "public" network and the 192.168.0.0/24 private network.

/ip firewall nat add chain=dstnat dst-address=203.0.113.11 dst-port=80 action=dst-nat to-addresses=192.168.0.11 to-port=80
/ip firewall nat add chain=dstnat dst-address=203.0.113.12 dst-port=80 action=dst-nat to-addresses=192.168.0.12 to-port=80

Re: nat question

Posted: Mon Oct 07, 2019 10:57 pm
by ce3msb
thanks¡¡¡¡ it works :)

Re: nat question

Posted: Mon Oct 07, 2019 11:19 pm
by IPANetEngineer
Awesome....can you please change the thread to "solved"