Don't know how to configuring a backup access

Hi,

I’m having trouble configuring a backup access for the servers LAN. I have attached an schema of the network. The idea is to have a backup remote access through the Internet in case of the main access (fat line at IP1) or the back haul is down.

The main internet access is the fat line with the IP1. All routers in the backhaul have the default route to this point. The router at IP1 has a dnat rule in order to map: IP1:port → server_IP:22 (remote ssh access). The idea is to have the same for IP2 (assigned to an ADSL router) which is near the servers LAN: IP2:port → server_IP:22.

The simple idea is to define a dnat at the ADSL router but it doesn’t works because the default gateway of the server’s router is to route to IP1. I have played with src/dnat, mark connection & mark routing at the server’s router without success. The idea is route back the flows coming through IP2 back to IP2 instead of through IP1.

Also please note that the internet computer which connects both to IP1:port or IP2:port is the same so you can’t rely on the source IP for a policy routing…

If anybody can assist or give some ideas it would be very appreciated. Feel free to ask any question if you have doubts.

Thanks,
Antonio
schema.jpg

Hi,

I finally managed to activate the backup link. I’m posting the results in case this helps anybody:

1.- In the ADSL router I have a Port Forward Rule:
ANY: → server:

2.- In the router I have a 0.0.0.0/0 route with a route mark=ADSL-ROUTE (with high cost than the default 0.0.0.0/0 route)

3.- In the router I defined two mangle rules:

0 chain=forward action=mark-connection new-connection-mark=coming-from-adsl passthrough=yes
in-interface=bridge-adsl

1 chain=prerouting action=mark-routing new-routing-mark=ADSL-ROUTE passthrough=yes in-interface=!bridge-adsl
connection-mark=coming-from-adsl

4.- The connection tracking is active


Regards,
Antonio