0% found this document useful (0 votes)
145 views1 page

Dual ISP Load Balancing Setup

This firewall configuration configures NAT and routing rules for two ISPs (isp-1 and isp-2) connected to the firewall over interfaces wlan1, wlan2, and LAN. Connections are marked with the appropriate ISP identifier and routed out the correct gateway based on the marks.

Uploaded by

Anton Ikhsan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views1 page

Dual ISP Load Balancing Setup

This firewall configuration configures NAT and routing rules for two ISPs (isp-1 and isp-2) connected to the firewall over interfaces wlan1, wlan2, and LAN. Connections are marked with the appropriate ISP identifier and routed out the correct gateway based on the marks.

Uploaded by

Anton Ikhsan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

/ip firewall nat

add action=masquerade chain=srcnat out-interface=wlan1


add action=masquerade chain=srcnat out-interface=wlan2

/ip firewall mangle


add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=wlan1 new-connection-mark=isp-1 passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=wlan2 new-connection-mark=isp-2 passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=LAN new-connection-mark=isp-1 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=LAN new-connection-mark=isp-2 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=isp-1 in-interface=\
LAN new-routing-mark=KEISP1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=isp-2 in-interface=\
LAN new-routing-mark=KEISP2 passthrough=yes
add action=mark-routing chain=output connection-mark=isp-1 new-routing-mark=\
KEISP1 passthrough=yes
add action=mark-routing chain=output connection-mark=isp-2 new-routing-mark=\
KEISP2 passthrough=yes

/ip route
add check-gateway=ping distance=1 gateway=X.X.X.X routing-mark=KEISP1
add check-gateway=ping distance=1 gateway=X.X.X.X routing-mark=KEISP2
add check-gateway=ping distance=1 gateway=X.X.X.X
add check-gateway=ping distance=1 gateway=X.X.X.X

You might also like