Community discussions

MikroTik App
 
cosinguyen93
just joined
Topic Author
Posts: 4
Joined: Sat Mar 16, 2024 6:42 pm

Port forwarding on multiple Mikrotik Routers with the same network mask

Sat Mar 16, 2024 7:16 pm

Hi everybody,
First here is my diagram: Image
With the above diagram, all 4 devices (3 routers and 1 PC) can PING each other, but when I forward port 3389 to the Internet, I encounter the following problem:

I use the following script on all 3 routers to forward ports:
/ip firewall nat add action=dst-nat chain=dstnat dst-address-type=local dst-port=11010 protocol=tcp to-addresses=192.168.0.10 to-ports=3389
But when I use the public ip addresses of the routers, only the public address of router 01 can be connected to. I can understand that because it is using the Default Gateway of 192.168.0.1 so it can work, however the purpose of implementing the above diagram is for when the internet in 1 of the 3 routers is down. I can use the public IP address of one of the two remaining routers to connect and set up a default gateway to the other router to continue using the Internet.

I tried another way that in addition to using the above script, I needed to add a srcnat with the following script to be able to use:
/ip firewall nat
add action=masquerade chain=srcnat comment="Internet" out-interface=all-ppp
add action=masquerade chain=srcnat comment="Hairpin" dst-address-list=lanAddresses src-address-list=lanAddresses
add action=masquerade chain=srcnat out-interface=bridgeLAN <<< here
It worked. But I hope anyone can explain how it works and what is a better option (if there is any)
Thank you for reading and looking forward to hearing your comments
 
cosinguyen93
just joined
Topic Author
Posts: 4
Joined: Sat Mar 16, 2024 6:42 pm

Re: Port forwarding on multiple Mikrotik Routers with the same network mask

Sun Mar 17, 2024 6:07 am

Bump
 
cosinguyen93
just joined
Topic Author
Posts: 4
Joined: Sat Mar 16, 2024 6:42 pm

Re: Port forwarding on multiple Mikrotik Routers with the same network mask

Mon Mar 18, 2024 6:08 am

bump
 
User avatar
BrateloSlava
Member Candidate
Member Candidate
Posts: 170
Joined: Mon Aug 09, 2021 10:33 am
Location: Ukraine, Kharkiv

Re: Port forwarding on multiple Mikrotik Routers with the same network mask

Mon Mar 18, 2024 9:10 am

Perhaps, this will help you. Read about VRRP.
Links:
 
cosinguyen93
just joined
Topic Author
Posts: 4
Joined: Sat Mar 16, 2024 6:42 pm

Re: Port forwarding on multiple Mikrotik Routers with the same network mask

Fri Apr 05, 2024 4:17 am

Perhaps, this will help you. Read about VRRP.
Links:
Thank you for your reply, but I still have to follow the old diagram. Since it has to run like that, I just want to ask the optimal way

Who is online

Users browsing this forum: ThaiDai and 15 guests