S
S
Soundmax2021-04-22 11:13:02
Mikrotik
Soundmax, 2021-04-22 11:13:02

How to set up NAT loopback on Mikrotik with two providers?

Good afternoon.
The situation is as follows - there is a Mikrotik configured to work through two providers, where one subnet goes through ISP1, and the second through ISP2.
The setting was made according to this article (only without a backup ISP3)
https://habr.com/ru/post/186284/

However, with this setting, it is not possible to organize access from the local network to the external IP address.
As I understand it, this is due to the route marking rule and subsequent routing

chain=prerouting action=mark-routing new-routing-mark=office 1 passthrough=no src-address=192.168.101.0/24 
     dst-address-list=!LocalNet

dst-address=0.0.0.0/0 gateway=172.25.25.1  check-gateway=arp distance=10 routing-mark=office 1
dst-address=0.0.0.0/0 gateway=192.168.99.1 check-gateway=arp distance=11 routing-mark=office 1


Tell me, how in this case to implement access to the external IP from the LAN?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
brlumen, 2021-04-22
@brlumen

What means

organize access from the local network to an external IP address.

Could you elaborate on what you can't do?

A
Alexander Karabanov, 2021-04-22
@karabanov

For example:

/ip firewall address-list
add address=<ваш IP 1> list=inet-IP
add address=<ваш IP 2> list=inet-IP
add address<ваша подсеть 1>/24 list=LocalNet
add address<ваша подсеть 2>/24 list=LocalNet

/ip firewall nat
add action=dst-nat chain=dstnat comment="To WEB-Server" dst-address-list=inet-IP dst-port=80,443 protocol=tcp to-addresses=<IP адрес>
add action=masquerade chain=srcnat comment="Hirepin NAT" out-interface-list=LAN src-address-list=LocalNet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question