Community discussions

MikroTik App
 
logros
newbie
Topic Author
Posts: 49
Joined: Thu Feb 04, 2010 11:01 pm

PCC loadbalancing and WebProxy for Lan

Tue Feb 16, 2010 1:31 pm

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?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Tue Feb 16, 2010 1:48 pm

/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
 
logros
newbie
Topic Author
Posts: 49
Joined: Thu Feb 04, 2010 11:01 pm

Re: PCC loadbalancing and WebProxy for Lan

Tue Feb 16, 2010 5:13 pm

/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_ma ... _web_proxy
don't work right
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Tue Feb 16, 2010 6:47 pm

what exactly does not work?

what do you do, what do you expect, and what does it do instead?
 
logros
newbie
Topic Author
Posts: 49
Joined: Thu Feb 04, 2010 11:01 pm

Re: PCC loadbalancing and WebProxy for Lan

Tue Feb 16, 2010 8:12 pm

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
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Tue Feb 16, 2010 11:46 pm

and what's with web surfing? does it work? and does that rule count packets?
 
logros
newbie
Topic Author
Posts: 49
Joined: Thu Feb 04, 2010 11:01 pm

Re: PCC loadbalancing and WebProxy for Lan

Wed Feb 17, 2010 5:08 pm

any activities
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Wed Feb 17, 2010 6:20 pm

any activities WHAT?..
 
rojocesar
just joined
Posts: 4
Joined: Sun Feb 28, 2010 11:17 pm

Re: PCC loadbalancing and WebProxy for Lan

Mon Mar 01, 2010 6:13 am

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..
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Tue Mar 02, 2010 7:03 pm

do those rules count packets?..

do you have any other rules in mangle output?
 
rojocesar
just joined
Posts: 4
Joined: Sun Feb 28, 2010 11:17 pm

Re: PCC loadbalancing and WebProxy for Lan

Tue Mar 02, 2010 8:00 pm

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
 
rainmaker
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Fri Jan 30, 2009 9:32 pm

Re: PCC loadbalancing and WebProxy for Lan

Wed Mar 03, 2010 7:16 pm

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
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Fri Mar 05, 2010 10:19 am

it is right if it is working. is it?
 
rojocesar
just joined
Posts: 4
Joined: Sun Feb 28, 2010 11:17 pm

Re: PCC loadbalancing and WebProxy for Lan

Mon Mar 08, 2010 3:14 pm

:( 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...
 
kazanova
Member
Member
Posts: 406
Joined: Tue Sep 06, 2005 11:52 am

Re: PCC loadbalancing and WebProxy for Lan

Mon Mar 08, 2010 11:40 pm

/ 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_Bala ... e_Gateways
if we use this for what pcc config
 
rojocesar
just joined
Posts: 4
Joined: Sun Feb 28, 2010 11:17 pm

Re: PCC loadbalancing and WebProxy for Lan

Tue Mar 09, 2010 5:40 pm

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"
 
kazanova
Member
Member
Posts: 406
Joined: Tue Sep 06, 2005 11:52 am

Re: PCC loadbalancing and WebProxy for Lan

Tue Mar 09, 2010 6:22 pm

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
You do not have the required permissions to view the files attached to this post.
 
treikov
just joined
Posts: 2
Joined: Sun Nov 07, 2010 12:10 am

Re: PCC loadbalancing and WebProxy for Lan

Fri Nov 12, 2010 4:55 am

Chupaka,

I have the same problem!!!

Any solution?

PCC + WebProxy + Hostpot + QoS not work...
http://forum.mikrotik.com/viewtopic.php?f=1&t=46564

Appreciate your help...

Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Thu Nov 18, 2010 3:19 pm

 
leonet45
just joined
Posts: 23
Joined: Fri Dec 17, 2010 2:18 am

Re: PCC loadbalancing and WebProxy for Lan

Fri Dec 17, 2010 10:48 pm

Work without first mangle rules (input - output)

why?
 
leonet45
just joined
Posts: 23
Joined: Fri Dec 17, 2010 2:18 am

Re: PCC loadbalancing and WebProxy for Lan

Sun Dec 19, 2010 1:46 am

i've the same problem. This works only if i disable this rules
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=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
Please we need help
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC loadbalancing and WebProxy for Lan

Tue Dec 21, 2010 1:18 am

and what exactly do you see with those rules enabled?

whet if you disable just input or output rules, but not together?
 
gtpro
newbie
Posts: 36
Joined: Thu Jun 03, 2010 9:05 pm

Re: PCC loadbalancing and WebProxy for Lan

Tue Dec 21, 2010 3:43 am

Hey Logros try this setup, adjust it to your needs.

/ip firewall mangle
add action=mark-connection chain=input disabled=no in-interface=pppoe-out1 new-connection-mark=pppoe-out1_conn passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out2 new-connection-mark=pppoe-out2_conn passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out3 new-connection-mark=pppoe-out3_conn passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out4 new-connection-mark=pppoe-out4_conn passthrough=yes

add action=mark-connection chain=output disabled=no dst-port=80 new-connection-mark=pppoe-out1_conn passthrough=yes per-connection-classifier=both-addresses:4/0 protocol=tcp
add action=mark-connection chain=output disabled=no dst-port=80 new-connection-mark=pppoe-out2_conn passthrough=yes per-connection-classifier=both-addresses:4/1 protocol=tcp
add action=mark-connection chain=output disabled=no dst-port=80 new-connection-mark=pppoe-out3_conn passthrough=yes per-connection-classifier=both-addresses:4/2 protocol=tcp
add action=mark-connection chain=output disabled=no dst-port=80 new-connection-mark=pppoe-out4_conn passthrough=yes per-connection-classifier=both-addresses:4/3 protocol=tcp

add action=mark-connection chain=prerouting disabled=no dst-address-type=!local dst-port=!80 in-interface=Local new-connection-mark=pppoe-out1_conn passthrough=yes per-connection-classifier=both-addresses:4/0 protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local dst-port=!80 in-interface=Local new-connection-mark=pppoe-out2_conn passthrough=yes per-connection-classifier=both-addresses:4/1 protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local dst-port=!80 in-interface=Local new-connection-mark=pppoe-out3_conn passthrough=yes per-connection-classifier=both-addresses:4/2 protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local dst-port=!80 in-interface=Local new-connection-mark=pppoe-out4_conn passthrough=yes per-connection-classifier=both-addresses:4/3 protocol=tcp

add action=mark-routing chain=prerouting connection-mark=pppoe-out1_conn disabled=no in-interface=Local new-routing-mark=to_pppoe-out1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=pppoe-out2_conn disabled=no in-interface=Local new-routing-mark=to_pppoe-out2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=pppoe-out3_conn disabled=no in-interface=Local new-routing-mark=to_pppoe-out3 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=pppoe-out4_conn disabled=no in-interface=Local new-routing-mark=to_pppoe-out4 passthrough=yes

add action=mark-routing chain=output connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes
add action=mark-routing chain=output connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes
add action=mark-routing chain=output connection-mark=pppoe-out3_conn disabled=no new-routing-mark=to_pppoe-out3 passthrough=yes
add action=mark-routing chain=output connection-mark=pppoe-out4_conn disabled=no new-routing-mark=to_pppoe-out4 passthrough=yes

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

add action=redirect chain=dstnat disabled=no dst-port=80 in-interface=Local protocol=tcp to-ports=3123
 
leonet45
just joined
Posts: 23
Joined: Fri Dec 17, 2010 2:18 am

Re: PCC loadbalancing and WebProxy for Lan

Wed Dec 22, 2010 7:28 pm

and what exactly do you see with those rules enabled?

whet if you disable just input or output rules, but not together?
If this rules are enabled. Webproxy doesn't work and i don't see connections on webproxy tab

Who is online

Users browsing this forum: Bing [Bot], JDF, Kanzler and 193 guests