Community discussions

 
ThunderBRZ
just joined
Topic Author
Posts: 13
Joined: Sun Feb 17, 2008 6:35 pm

Load balance w/ sites

Sun Feb 17, 2008 6:46 pm

Hi

sorry 4 my poor english

but i need help !!!

i have this :

10.10.0.1 Gateway1 | 10.10.1.1 Gateway 2
|
Mk NAT (Load Balance)
|
192.168.8.0/24 (clients)

But i need use Gateway 2 for download only youtube videos

how to make it????

tks 4 any help

[]´s
 
kthameen
Frequent Visitor
Frequent Visitor
Posts: 87
Joined: Wed Dec 21, 2005 4:22 am
Location: Leuven,Belgium

Re: Load balance w/ sites

Wed Feb 20, 2008 5:40 pm

Hello Thunder ,

yes you can do that using the following mangle and route rules

at /ip firewall mangle

3 chain=prerouting action=mark-routing new-routing-mark=youtube
passthrough=yes src-address=0.0.0.0/0 dst-address=208.65.152.0/21

4 chain=prerouting action=mark-routing new-routing-mark=youtube
passthrough=yes src-address=0.0.0.0/0 dst-address=72.14.192.0/18

5 chain=prerouting action=mark-routing new-routing-mark=youtube
passthrough=yes src-address=0.0.0.0/0 dst-address=74.125.0.0/16


at /ip route

add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.10.1.1 \
routing-mark=youtube scope=255 target-scope=10

I have to include also google videos still coz they r linked from youtube ,I ll do that later at night

regards,
 
User avatar
kolorasta
Member Candidate
Member Candidate
Posts: 299
Joined: Sun Jun 25, 2006 11:55 pm
Location: Argentina

Re: Load balance w/ sites

Tue Dec 16, 2008 1:29 am

hi.. i'm working in load balance depending on the destination ip but i can't make it work :(

i tried the example above but no luck. i use dst-addresslist instead dst-address because a have in address list, a list with the ip of sites i want to redirect to the alternative wan.
i've been reading all wiki examples and i arrived to a solution similar to the one posted above but no luck

my router has no mangle rules, because i use a traffic shapper in another pc... this router is only used for nat & firewall.

i have:
2 lan interfaces bridged
2 wan interfaces (wan1 ip 200.45.??.??/255.255.255.248 :: wan2 ip 10.0.0.2/255.255.255.0)
i want to route youtube through wan2
a squid pc conected to lan1
all clients connected to lan2

lan network=172.16.0.0/21

in ip/firewall/nat i don't use masquerade. i use scr-nat and dst-nat (i assign some public ip to clients)
i use a nat rule to redirect all packets to port 80 to the squid pc

i don't pretend you to give me the exact code, i just would like some guide, some general steps to follow... i'm lost

thanks in advance & sorry for my poor english
 
User avatar
kolorasta
Member Candidate
Member Candidate
Posts: 299
Joined: Sun Jun 25, 2006 11:55 pm
Location: Argentina

Re: Load balance w/ sites

Sat Dec 20, 2008 9:07 pm

i solve it. i was making a mistake marking packet from the squid

Who is online

Users browsing this forum: MSN [Bot] and 46 guests