cant get dual WAN to work with proxy

Hi, i’m trying to setup access to internet through 2 WAN ports connected to the same gateway. I do not use any NAT but i use a proxy on the routerboard.

I’ve tried following the tutorial already on mikrotik wiki but i found that it only uses one interface for all traffic. I tested downloading a linux DVD image using torrent and i get the speed of one connections only while monitoring from the interface list shows data transfer on only 1 of the WAN interfaces.

Both WAN interfaces recieves DHCP from ISP but with same gateway. Is there a way to load balance it with equal traffic?

Thanks.

There are many ways you can do that
Option 1 :
In routes in the gateway entry select the interface name rather then putting a gateway IP
Option 2 :
Mark the Traffic with port 80 traffic to WAN1 and rest of the traffic to WAN2 port by NAT and Mangle rules

Regards,
Kashif Qamar
romahiz.wordpress.com

I’m doing the same kind of setup, and have for the most part succeeded, however the Proxy breaks the config (I suspect it is something to do with the mangle vs the NAT redirect, but I can’t put my finger on it). If I leave the transparent proxy rule out within the NAT section, everything works like a charm, if I enable it, it breaks traffic destined for port 80.

Any thoughts?

Currently I have the following setup (excuse them being disabled for now):

Mangle:

Flags: X - disabled, I - invalid, D - dynamic
0 X chain=prerouting action=mark-routing new-routing-mark=mark_adsl
passthrough=yes protocol=tcp in-interface=lan dst-port=80

1 X chain=prerouting action=mark-routing new-routing-mark=mark_fibre
passthrough=yes protocol=tcp in-interface=lan dst-port=!80

NAT:

0 ;;; all-wan-nat
chain=srcnat action=masquerade

5 ;;; Redirect 80 to proxy
chain=dstnat action=redirect to-ports=8080 protocol=tcp
dst-port=80

Routes:

0 X S 0.0.0.0/0 192.168.5.4 1 (using mark_adsl routing mark)
1 X S 0.0.0.0/0 192.168.0.4 1 (using mark_fibre routing mark)

On further playing around it looks like the Web Proxy strips the routing mark. If I add an additional gateway that does not have a routing mark, browsing then works again through that gateway.

Is there a way I can force traffic from the proxy to another gateway, while not forcing the rest of the traffic to it?

i managed to make mine work but not very well while still using a web proxy. I remember reading for linux and windows OS if the routing mark is the same value than traffic would use both interfaces. Web proxy makes the routerboard more like a PC in this sense so you dont need to use NAT rules if you only want to use the web proxy.

You can redirect port 80 traffic and web proxy traffic at the same time if you use NAT, just make sure to set the destination addresses differently.
unless you’re using a web proxy transparently i dont see why you’d want to route http traffic through NAT and web proxy at the same time. I’m not sure if this would work because i havent tried it, however i find it works for many different rules. I have never managed to get routerOS web proxy transparency to properly work. A web proxy doesnt use NAT because routerOS makes the requests instead of translating them.

So far my dual WAN works with NAT and web proxy but i havent managed to find a way to properly test it.

in your mangle you are using prerouting chain, when you redirect web traffic to web proxy on mikrotik that traffic becomes output chain, becae usmikrotik is sending that traffic to outside after inspection

Thanks very much, shall try this on Monday. I had something similar with outgoing VPN connections and found it to work on the output chain.