I use a load balancing as follows.
And it works fine.
Code: Select all
/iterface detail
address=178.49.xxx.xxx/26 network=178.49.xxx.xxx interface=ether1 actual-interface=ether1 #/default route
address=178.49.xxx.xxx/26 network=178.49.xxx.xxx interface=ether2 actual-interface=ether2
address=192.168.0.1/24 network=192.168.0.0 interface=ether3 actual-interface=ether3
/ip firewall address-list
add address=192.168.0.7 disabled=no list=WAN2
add address=192.168.0.8 disabled=no list=WAN2
add address=192.168.0.9 disabled=no list=WAN2
add address=192.168.0.10 disabled=no list=WAN2
add address=192.168.0.11 disabled=no list=WAN2
add address=192.168.0.12 disabled=no list=WAN2
/ip firewall mangle
add action=mark-routing chain=prerouting disabled=no new-routing-mark=markWAN2 passthrough=no \
src-address-list=WAN2
/ip firewall nat
add action=masquerade chain=srcnat disabled=no
add action=masquerade chain=srcnat disabled=no src-address-list=WAN2
/route detail
dst-address=0.0.0.0/0 gateway=178.49.xxx.xxx gateway-status=178.49.xxx.xxx reachable ether1
distance=0 scope=30 target-scope=10 vrf-interface=ether1
dst-address=0.0.0.0/0 gateway=178.49.xxx.xxx
gateway-status=178.49.xxx.xxx reachable ether2 distance=1 scope=30 target-scope=10
routing-mark=markWAN2
New Rule.
Code: Select all
add action=redirect chain=dstnat disabled=no dst-port=80 protocol=tcp to-ports=3128
Can you please tell how to configure the proxy to maintain load balancing?
I have the feeling that the marking of traffic is not retained after going through a proxy.
If this is not possible by means of Mikrotik, I can use an external proxy server (Squid Linux). How to implement it?
Thanks in advance. Any advice would be greatly appreciated.