Community discussions

MikroTik App
 
ronix
Member Candidate
Member Candidate
Topic Author
Posts: 151
Joined: Thu Nov 17, 2011 6:51 pm

can we redirect only video to squid cache ?

Sun Dec 29, 2013 11:48 am

Dears ...

we have 2 squid caches one for every port 80 connections except videos and the 2nd one for videos only

we can redirect all port 80 connections (with videos) to 1st cache with no problem

but how can we split the videos and redirect it to 2nd cache ?

we try several rules in NAT but with no success...

any idea to solve it ?
 
toni17
newbie
Posts: 36
Joined: Thu Dec 15, 2011 9:55 pm

Re: can we redirect only video to squid cache ?

Thu Jan 02, 2014 1:01 am

I have only one Squid Cache Server on my network . I have solved to split youtube videos with mikrotik , but not other video sites and is working perfectly.
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: can we redirect only video to squid cache ?

Thu Jan 02, 2014 3:32 am

can you help with a squid setup
 
ronix
Member Candidate
Member Candidate
Topic Author
Posts: 151
Joined: Thu Nov 17, 2011 6:51 pm

Re: can we redirect only video to squid cache ?

Thu Jan 02, 2014 11:54 am

I have only one Squid Cache Server on my network . I have solved to split youtube videos with mikrotik , but not other video sites and is working perfectly.
How??
 
kingmkh
just joined
Posts: 7
Joined: Thu Jun 07, 2007 11:41 am

Re: can we redirect only video to squid cache ?

Thu Jan 02, 2014 12:25 pm

Maybe with layer7 route marking can split video stream if video streaming had layer7 regex

Sent from my GT-N7100 using Tapatalk
 
toni17
newbie
Posts: 36
Joined: Thu Dec 15, 2011 9:55 pm

Re: can we redirect only video to squid cache ?

Sat Jan 04, 2014 11:45 pm

First Create Layer 7 Rule Name : youtube.com Regexp : youtube.com then im posting my Mangle rules
;;; Youtube Connection Mark
chain=prerouting action=mark-connection new-connection-mark=youtube.com
passthrough=yes protocol=tcp layer7-protocol=youtube.com

;;; Youtube Packets mark
chain=postrouting action=mark-packet new-packet-mark=youtube.com
passthrough=no protocol=tcp connection-mark=youtube.com

;;; Youtube Address List
chain=prerouting action=add-dst-to-address-list protocol=tcp
address-list=youtube.com address-list-timeout=0s
layer7-protocol=youtube.com dst-port=80

Now we have catched Youtube.com Packets
 
ronix
Member Candidate
Member Candidate
Topic Author
Posts: 151
Joined: Thu Nov 17, 2011 6:51 pm

Re: can we redirect only video to squid cache ?

Sun Jan 05, 2014 10:54 am

Dears...

we know how to catch all streaming (youtube,mp4,avi,mpeg,mov...etc) by layer 7

but how can we separate this streaming from port 80 connections and redirect it to video cache server ?
 
toni17
newbie
Posts: 36
Joined: Thu Dec 15, 2011 9:55 pm

Re: can we redirect only video to squid cache ?

Sun Jan 05, 2014 12:09 pm

I have maded this possible with two RB450G , two PPPoE Lines & one Squid Cache.
Its a complex of configurations that i dont know where to start .
;;; Youtube Connection Mark
chain=prerouting action=mark-connection new-connection-mark=youtube.com
passthrough=yes protocol=tcp layer7-protocol=youtube.com

;;; Youtube Packets mark
chain=postrouting action=mark-packet new-packet-mark=youtube.com
passthrough=no protocol=tcp connection-mark=youtube.com

;;; Youtube Address List
chain=prerouting action=add-dst-to-address-list protocol=tcp
address-list=youtube.com address-list-timeout=0s
layer7-protocol=youtube.com dst-port=80

;;; Youtube Route
chain=prerouting action=mark-routing new-routing-mark=Youtube
passthrough=yes dst-address-list=youtube.com

;;; YouTube Squid Port
chain=dstnat action=dst-nat to-addresses=192.168.7.3 to-ports=8081
protocol=tcp dst-address-list=youtube.com dst-port=80

192.168.7.3 is squid ip adress
I found tha only ROS 6.2 makes this.
but i got one year studying and reading to find the best configs for squid proxy
 
ronix
Member Candidate
Member Candidate
Topic Author
Posts: 151
Joined: Thu Nov 17, 2011 6:51 pm

Re: can we redirect only video to squid cache ?

Sun Jan 05, 2014 1:24 pm

;;; Youtube Address List
chain=prerouting action=add-dst-to-address-list protocol=tcp
address-list=youtube.com address-list-timeout=0s
layer7-protocol=youtube.com dst-port=80
I think this was our mistake that we didn't work on address list

we will try it and feed back
 
reinerotto
Long time Member
Long time Member
Posts: 520
Joined: Thu Dec 04, 2008 2:35 am

Re: can we redirect only video to squid cache ?

Mon Jan 06, 2014 10:39 pm

Instead of youtube.com you must use "googlevideo.com" to handle the videos, at least in my geogr. area.

In case, you do not succeed with your MT-setup, consider to route all traffic to your 1'st squid, and then use special ACLs to forward (youtube.com|googlevideo.com) to 2'nd squid, acting as upstream/parent-squid.
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: can we redirect only video to squid cache ?

Mon Oct 06, 2014 6:06 pm

ronix you have running squid servers as i keep getting problems after a week or so so removed them have you got a vm setup so i can look at your config

Who is online

Users browsing this forum: Ask Jeeves [Bot], dschnur, Maajed, techcomtecnico and 103 guests