Community discussions

MikroTik App
 
User avatar
Chaosphere64
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Wed Aug 10, 2016 10:19 pm

Dual WAN Setup - how to get both public IPs reachable

Sun Sep 20, 2020 11:00 pm

Hi,

I have a quite simple setup using a RB4011 with two WAN Links (ISP1 and ISP2).

The route table has two entries for 0.0.0.0/0, one with an AD of 1 (ISP1), the other with an AD of 2 (ISP2). I just have that floating route for failover and don't need anything more advanced (load balancing etc.). But there is one problem I want to fix.

I want to monitor my two public IP addresses from the outside, simply by pinging them. While I can easily ping the ISP1 IP while the route is active I can't ping ISP2 IP because the default route (leading back to the source) leads return packets via the other ISP.

So my question is: what packet/connection/route marking and route setup would I need to have packets coming in from one ISP leave the router the same way?

Thanks in advance!
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19405
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Dual WAN Setup - how to get both public IPs reachable

Sun Sep 20, 2020 11:17 pm

Perhaps setup a dyndns account pointing to the second ISP?
 
User avatar
xvo
Forum Guru
Forum Guru
Posts: 1237
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Dual WAN Setup - how to get both public IPs reachable

Mon Sep 21, 2020 1:20 am

Add two additional routing tables with default routes for each of WAN connections.
And then a couple of routing rules, that restrict usage of the tables depending on src IP:
/ip route
add distance=1 gateway=gw-ip-for-isp1 routing-mark=isp1
add distance=1 gateway=gw-ip-for-isp2 routing-mark=isp2

/ip route rule
add action=lookup-only-in-table src-address=your-wan-ip1 table=isp1
add action=lookup-only-in-table src-address=your-wan-ip2 table=isp2
 
User avatar
Chaosphere64
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Wed Aug 10, 2016 10:19 pm

Re: Dual WAN Setup - how to get both public IPs reachable

Mon Sep 21, 2020 8:26 am

Add two additional routing tables with default routes for each of WAN connections.
And then a couple of routing rules, that restrict usage of the tables depending on src IP:
Great solution, thanks a lot!
 
yastt
just joined
Posts: 9
Joined: Wed Oct 24, 2018 10:45 pm

Re: Dual WAN Setup - how to get both public IPs reachable

Mon Mar 25, 2024 12:54 am

I have exactly the same problem as Chaosphere64. After creating the proposed entries, both WAN addresses started responding to pings. Unfortunately, at the same moment the IPSec Lan2Lan connection between Mikrotik and the router in the Headquarters stopped working. How can I solve this problem?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19405
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Dual WAN Setup - how to get both public IPs reachable

Mon Mar 25, 2024 2:14 am

By fixing your config.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3509
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Dual WAN Setup - how to get both public IPs reachable

Mon Mar 25, 2024 2:43 am

I have exactly the same problem as Chaosphere64. [...] IPSec Lan2Lan connection [...] How can I solve this problem?
To @anav's point, your problem is not the same. IPSec isn't mentions at all here & that add more complexity.
Likely better to create a topic with your config/diagram/details.

Who is online

Users browsing this forum: rajakashifilyas and 13 guests