Page 1 of 1

I need to control the Facebook and Youtube Bandwidth

Posted: Mon Jul 22, 2019 1:11 pm
by sampgoogly
Hi,
Is there any update method to control the bandwidth for Facebook and youtube users. In my network i have only 20 MBPS. But due to most of the user using facebook and youtube during office time, i want to control bandwidth and set limit to Facebook and youtube. I tried layer 7 protocol it does not work.

Re: I need to control the Facebook and Youtube Bandwidth

Posted: Tue Jul 23, 2019 3:08 am
by rdgavelar
Hi,

I was search about the same thing, and i found this
viewtopic.php?t=109024
I didn't test yet.

best regards.

Re: I need to control the Facebook and Youtube Bandwidth

Posted: Wed Aug 14, 2019 7:42 pm
by sampgoogly
Hi,

I was search about the same thing, and i found this
viewtopic.php?t=109024
I didn't test yet.

best regards.
thanks i will try and let u know

Re: I need to control the Facebook and Youtube Bandwidth

Posted: Sun Aug 25, 2019 12:36 am
by Kampfwurst
Did it work? I need the same

Re: I need to control the Facebook and Youtube Bandwidth

Posted: Wed Nov 20, 2019 1:47 pm
by sampgoogly
Did it work? I need the same
no its not worked bro :(

Re: I need to control the Facebook and Youtube Bandwidth

Posted: Wed Nov 20, 2019 4:59 pm
by ivicask
/system scheduler
add interval=30s name=YoutubeAdressList on-event="/system script run YoutubeDns" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jan/22/2019 start-time=12:24:55


Add this script with name "YoutubeDns"

:local myServers { "googlevideo" }
:local myListName "YoutubeServers"
:local myTimeout "24:00:00"

/ip dns cache all {
    :foreach i in=$myServers do={
        :foreach j in=[find where (name~$i)] do={
            :do {
                :local myName [get $j name]
                :local myType [get $j type]
                :local myData [get $j data]

                :if ($myType = "A") do={
                    :do {
                        /ip firewall address-list add address=$myData list=$myListName comment="DNSCACHE-$i-$myName" timeout=$myTimeout
                    } on-error={
                        :put "DNSCACHE: Error on $myName $myData $myType"
                    }
                }

                :if ($myType = "CNAME") do={
                    :local currentName $j
                    :local nextName [find where (name=$myData && type="CNAME")]

                    :while ($nextName != "") do={
                        :set currentName $nextName
                        :resolve $currentName
                        :set nextName [find where (name=[get $nextName data] && type="CNAME")]
                    }

                    :resolve [get $currentName data]

                    :foreach k in=[find where (name=[get $currentName data] && type="A")] do={
                        :set myData [get $k data]
                        :do {
                            /ip firewall address-list add address=$myData list=$myListName comment="DNSCACHE-$i-$myName" timeout=$myTimeout
                        } on-error={
                            :put "DNSCACHE: Error on $myName $myData $myType"
                        }
                    }
                }
            } on-error={
                :put "DNSCACHE: Missing Entry"
            }
        }
    }
}
For youtube, it works for me, theres a bit delay until it gets first addresses but works after it, no better way to do it.