Mapping ip's

Hi all ;
today i will start a new topic related with the NAT document in the mikrotik web site .
i took the following part from it to start this topic .

Example of 1:1 mapping
If you want to link Public IP subnet 11.11.11.0/24 to local one 2.2.2.0/24, you should use destination address translation and source address translation features with action=netmap.

/ip firewall nat add chain=dstnat dst-address=11.11.11.1-11.11.11.254
action=netmap to-addresses=2.2.2.1-2.2.2.254

/ip firewall nat add chain=srcnat src-address=2.2.2.1-2.2.2.254
action=netmap to-addresses=11.11.11.1-11.11.11.254

to start the topic with the simplest question then to make it more complex later .
assume i have the following ip’s from ISP :
192.168.1.1/24 for the lan
and my local network will have the following ip’s :
192.168.3.1/24
if i made mapping as the document say .
How can i activate the web-proxy and cache ? , then i will need to put a rule to redirect to port like 3128 in firewall NAT .
this is part one .
waiting your feedbacks and reply .
with best regards .
:slight_smile:

Just put your proxy rule before your 1:1 mappings.

-Louis

Hi ;
Thanks for your reply .
I will test it and reply to you once i finish the tests .
i have two MT OS installed on two pc’s , the first one will work as router just to masqurade the local network to my isp and act as DNS server .
the second one will do the rest so assume the following ip’s

  1. the isp ip , 10.1.1.2 , 255.255.255.30
  2. the lan ip , 192.168.0.1/24 .
    and the second server ip’s :
  3. the wan ip , 192.168.0.2/24
  4. the lan ip , 192.168.1.1/24
    i need to connect the ip 192.168.1.3 to 192.168.0.3
    and 192.168.1.4 to 192.168.0.4
    and so on .
    i will do some tests and will be waiting all the replies and feedbacks .
    with best regards .
    :slight_smile: