PCC loadbalancing and WebProxy for Lan

have 3 ISP dynamic PPPoE load-balancing uplinks and 1 Lan
Need Webpoxy to work in this config

/ ip firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-mark=wan2_conn
add chain=input in-interface=pppoe-out3 action=mark-connection new-connection-mark=wan3_conn


add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2
add chain=output connection-mark=wan3_conn action=mark-routing new-routing-mark=to_wan3



add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes

add chain=prerouting connection-mark=wan1_conn in-interface=Local action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=Local action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=Local action=mark-routing new-routing-mark=to_wan3

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_wan3 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out3 distance=3 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
add chain=srcnat out-interface=pppoe-out3 action=masquerade

Can anyone to help me?

/ip firewall mangle
add chain=output connection-mark=no-mark per-connection-classifier=both-addresses:3/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=output connection-mark=no-mark per-connection-classifier=both-addresses:3/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes
add chain=output connection-mark=no-mark per-connection-classifier=both-addresses:3/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes

and place them at the top of output mangle rules

thank’s but how to configure web-proxy redirect right?

doing like this http://wiki.mikrotik.com/wiki/How_to_make_transparent_web_proxy
don’t work right

what exactly does not work?

what do you do, what do you expect, and what does it do instead?

ip firewall nat add in-interface=Local dst-port=80 protocol=tcp action=redirect to-ports=8080 chain=dstnat
ip proxy set enabled=yes port=8080


in winbox menu ip webproxy tab connections dont see any activities

and what’s with web surfing? does it work? and does that rule count packets?

any activities

any activities WHAT?..

You wrote this configuration

/ip firewall mangle
add chain=output per-connection-classifier=dst-address:2/0 action=mark-routing new-routing-mark=table1 disabled=no
add chain=output per-connection-classifier=dst-address:2/1 action=mark-routing new-routing-mark=table2 disabled=no

I test these configuration but doesn`t work.. if i don’t use webproxy all works fine but when I want to use web proxy only work one ADSL and doesn’t work tha balance with pcc..

do those rules count packets?..

do you have any other rules in mangle output?

Here send my configuration..

/ ip firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-mark=wan2_conn

add chain=output connection-mark=no-mark per-connection-classifier=dst-addresses:2/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=output connection-mark=no-mark per-connection-classifier=dst-addresses:2/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting connection-mark=wan1_conn in-interface=Local action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=Local action=mark-routing new-routing-mark=to_wan2


/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade

I prove and nothign.. PCC works fine but when I try to used WEBPROXY doesn`t work

Is this right.
Thans

/ ip firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-mark=wan2_conn
add chain=input in-interface=pppoe-out3 action=mark-connection new-connection-mark=wan3_conn

add chain=output connection-mark=no-mark per-connection-classifier=both-addresses:3/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=output connection-mark=no-mark per-connection-classifier=both-addresses:3/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes
add chain=output connection-mark=no-mark per-connection-classifier=both-addresses:3/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes

add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2
add chain=output connection-mark=wan3_conn action=mark-routing new-routing-mark=to_wan3



add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes

add chain=prerouting connection-mark=wan1_conn in-interface=Local action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=Local action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=Local action=mark-routing new-routing-mark=to_wan3

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_wan3 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out3 distance=3 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
add chain=srcnat out-interface=pppoe-out3 action=masquerade

it is right if it is working. is it?

:frowning: doesn’t work… I am wondering if chupaka have a RB with PCC with Proxy cache work’s fine ?it is because I only have in mangles the rules of web proxy and load balance pcc, well it work for a couple hours but after.. load balance with pcc doesn’t work.. this i can see in INTERFACE…
I hope your answer because my friend tell me that doesn’t work…

/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping



should this work as load
i can’t see any load balance
do u call ping load balance
load balance must be eqaul
if we wait unti ping goes out than we will have no load balance we will have load on one link

iam sure we all know Load Balancing over Multiple Gateways
http://wiki.mikrotik.com/wiki/Load_Balancing_over_Multiple_Gateways
if we use this for what pcc config

You talk about load balance over other gateways.. it is not really load balance.. I am talking about “PCC”.. if you write or help please first read.. “PCC load balancing”

Introduction
PCC matcher will allow you to divide traffic into equal streams with ability to keep packets with specific set of options in one particular stream

i had read and try it and i can’t see why it dont work good with me. pcc matcher dose’t divide traffic into equal streams
i have to upstream(ppoe) 256kb +256kb and one Lan
each time u see that graph change i disbale one lan and enable another one

/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=
pppoe-out2 routing-mark=to_wan2
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=
pppoe-out1
add check-gateway=ping comment=1 disabled=no distance=1 dst-address=0.0.0.0/0
gateway=pppoe-out1,pppoe-out2
add check-gateway=ping comment=“” disabled=no distance=1 dst-address=
0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=
pppoe-out


/ip firewall mangle
add action=mark-connection chain=input comment=“” disabled=no in-interface=
pppoe-out1 new-connection-mark=wan1_conn passthrough=yes
add action=mark-connection chain=input comment=“” disabled=no in-interface=
pppoe-out2 new-connection-mark=wan2_conn passthrough=yes
add action=mark-connection chain=output comment=“” connection-mark=wan2_conn
disabled=no new-connection-mark=wan1_conn passthrough=yes
per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=output comment=“” connection-mark=wan1_conn
disabled=no new-connection-mark=wan2_conn passthrough=yes
per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment=“” disabled=no
dst-address-type=!local in-interface=Local new-connection-mark=wan1_conn
passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment=“” disabled=no
dst-address-type=!local in-interface=Local new-connection-mark=wan2_conn
passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting comment=“” connection-mark=wan1_conn
disabled=no in-interface=Local new-routing-mark=to_wan1 passthrough=yes
add action=mark-routing chain=prerouting comment=“” connection-mark=wan2_conn
disabled=no in-interface=Local new-routing-mark=to_wan2 passthrough=yes

/ip firewall nat
add action=masquerade chain=srcnat comment=“” disabled=no out-interface=
pppoe-out1
add action=masquerade chain=srcnat comment=“” disabled=no out-interface=
pppoe-ou

/ip address
add address=192.168.10.2/24 broadcast=192.168.10.255 comment=
“default configuration” disabled=no interface=Local network=192.168.10.0
untitled.JPG

Chupaka,

I have the same problem!!!

Any solution?

PCC + WebProxy + Hostpot + QoS not work…
http://forum.mikrotik.com/t/pcc-webproxy-hostpot-qos-not-work/42195/1

Appreciate your help…

Thanks

http://forum.mikrotik.com/t/pcc-loadbalancing-and-webproxy-for-lan/35432/2 did not help?..

Work without first mangle rules (input - output)

why?