Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    (SHARE) MENGATASI ERROR BUKA YOUTUBE

    Scheduled Pinned Locked Moved Indonesian
    136 Posts 36 Posters 201.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      olop99
      last edited by

      jadi gimana solusinya nih gans…??

      1 Reply Last reply Reply Quote 0
      • H
        herymulyo
        last edited by

        SEKEDAR share install readbackward.pm di pfsense sesuai yang diajarkan om rb.nababan
        install package dari putty

        pkg_add -r http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/perl5/p5-File-ReadBackwards-1.05.tbz

        1 Reply Last reply Reply Quote 0
        • E
          extreemblank
          last edited by

          ngetest readbackward udah terinstall atau belum, bisa pake kode ini:

          
          #!/usr/bin/perl
          use File::ReadBackwards;
          
          $fh = File::ReadBackwards->new('/var/squid/log/access.log') or
          die "can't read file: $!\n";
          
          while ( defined($line = $fh->readline) )
          {
            print $line ;
          }
          
          

          simpan dengan nama cobaReadBack.pl

          lalu jalankan dengan perl cobaReadBack.pl, kalo ReadBackWards udah terinstall dengan baik, maka file squid/log/access.log akan ditampilkan secara terbalik ( dari akhir file ) alias BackWard.. itu sebabnya kang ucok karnadi pake library ini… baca file lognya dari belakang alias baris yang dibaca dulu adalah yang terakhir disimpan / ditambahkan kedalam log. CMIIW

          1 Reply Last reply Reply Quote 0
          • E
            extreemblank
            last edited by

            sesuaikan storeurl dengan style squid pfsense.

            perubahan di bagian akhir storeurl.pl

            
            ub GetID
            {
            $id = "";
            use File::ReadBackwards;
            my $lim = 200 ;
            my $ref_log = File::ReadBackwards->new('/var/squid/log/yt.log');
            while (defined($line = $ref_log->readline))
            {
            if ($line =~ m/.*youtube.*\/watch\?.*v=([a-zA-Z0-9\-\_]*).*\s.*id=$IDS[0].*/){
            $id = $1;
            last;
            }
            if ($line =~ m/.*youtube.*\/.*cpn=$CPN[0].*[&](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*/){
            $id = $2;
            last;
            }
            if ($line =~ m/.*youtube.*\/.*[&?](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*cpn=$CPN[0].*/){
            $id = $2;
            last;
            }
            last if --$lim <= 0;
            }
            if ($id eq ""){
            $id = $IDS[0];
            }
            $ref_log->close();
            return $id;
            }
            
            

            original storeurl.pl ada di http://tempat-sampah.googlecode.com/svn/storeurl.pl

            dan edit /usr/local/etc/squid/include.conf karena kita gak boleh edit squid.conf langsung.

            tambahkan kode ini paling atasnya sesuai petunjuk ucok karnady

            
            strip_query_terms off
            acl yutub url_regex -i .*youtube\.com\/.*$
            acl yutub url_regex -i .*youtu\.be\/.*$
            
            logformat squid1 %{Referer}>h %ru
            
            access_log /var/squid/log/yt.log squid1 yutub
            acl redirec urlpath_regex -i .*&redirect_counter=1&cms_redirect=yes
            acl redirec urlpath_regex -i .*&ir=1&rr=12
            cache deny redirec 
            acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*redirect_counter=1.*$
            acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*cms_redirect=yes.*$
            storeurl_access deny reddeny
            
            

            udah silakan dicoba dan share hasilnya … :P :D

            1 Reply Last reply Reply Quote 0
            • O
              olop99
              last edited by

              hasilnya bagaimana nih para mastah….

              1 Reply Last reply Reply Quote 0
              • I
                inyouxnow
                last edited by

                maaf saya mau tanya, untuk lusca berarti ga diperlukan enable-referrer-log nya ya ?

                1 Reply Last reply Reply Quote 0
                • E
                  emencavalera
                  last edited by

                  udah kelar mas, coba jalan-jalan keforum sebelah…tapi buat lusca sich...tinggal nunggu gelaran kang ucok untuk squid3+SSL Bump buat nangkep Https...hehehehehe

                  1 Reply Last reply Reply Quote 0
                  • D
                    dpa
                    last edited by

                    Hello guys,

                    I am lost on how to do this: install package dependencies "apt-get install libfile-readbackwards-perl"

                    Please help. thanks!

                    Regards

                    1 Reply Last reply Reply Quote 0
                    • Q
                      queues
                      last edited by

                      @extreemblank:

                      sesuaikan storeurl dengan style squid pfsense.

                      perubahan di bagian akhir storeurl.pl

                      
                      ub GetID
                      {
                      $id = "";
                      use File::ReadBackwards;
                      my $lim = 200 ;
                      my $ref_log = File::ReadBackwards->new('/var/squid/log/yt.log');
                      while (defined($line = $ref_log->readline))
                      {
                      if ($line =~ m/.*youtube.*\/watch\?.*v=([a-zA-Z0-9\-\_]*).*\s.*id=$IDS[0].*/){
                      $id = $1;
                      last;
                      }
                      if ($line =~ m/.*youtube.*\/.*cpn=$CPN[0].*[&](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*/){
                      $id = $2;
                      last;
                      }
                      if ($line =~ m/.*youtube.*\/.*[&?](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*cpn=$CPN[0].*/){
                      $id = $2;
                      last;
                      }
                      last if --$lim <= 0;
                      }
                      if ($id eq ""){
                      $id = $IDS[0];
                      }
                      $ref_log->close();
                      return $id;
                      }
                      
                      

                      original storeurl.pl ada di http://tempat-sampah.googlecode.com/svn/storeurl.pl

                      dan edit /usr/local/etc/squid/include.conf karena kita gak boleh edit squid.conf langsung.

                      tambahkan kode ini paling atasnya sesuai petunjuk ucok karnady

                      
                      strip_query_terms off
                      acl yutub url_regex -i .*youtube\.com\/.*$
                      acl yutub url_regex -i .*youtu\.be\/.*$
                      
                      logformat squid1 %{Referer}>h %ru
                      
                      access_log /var/squid/log/yt.log squid1 yutub
                      acl redirec urlpath_regex -i .*&redirect_counter=1&cms_redirect=yes
                      acl redirec urlpath_regex -i .*&ir=1&rr=12
                      cache deny redirec 
                      acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*redirect_counter=1.*$
                      acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*cms_redirect=yes.*$
                      storeurl_access deny reddeny
                      
                      

                      udah silakan dicoba dan share hasilnya … :P :D

                      Sudah saya coba, Lusca tidak mau berjalan. jika bagian didalam file include.conf :

                      storeurl_rewrite_program /usr/local/etc/squid/storeurl.pl

                      diganti  menjadi

                      #storeurl_rewrite_program /usr/local/etc/squid/storeurl.pl

                      lusca mau berjalan, tetapi yutub dan lain-lainnya tidak ngecache.

                      di system log juga ada pesan klo lusca tidak berjalan, seperti ini :
                      "squid[51782]: The store_rewriter helpers are crashing too rapidly, need help!"

                      sama tulisan log seperti TCP_Miss atau TCP_hit dsb. di tail -f /var/squid/logs/access.log tidak muncul.
                      tapi tulisan link nya muncul dan bergerak.

                      Mohon pencerahannya

                      1 Reply Last reply Reply Quote 0
                      • Q
                        queues
                        last edited by

                        @dpa:

                        Hello guys,

                        I am lost on how to do this: install package dependencies "apt-get install libfile-readbackwards-perl"

                        Please help. thanks!

                        Regards

                        what ur pfsense version? amd or intel?

                        1 Reply Last reply Reply Quote 0
                        • H
                          herymulyo
                          last edited by

                          FATAL: Cannot open '/var/squid/log/yt.log' because
                          the parent directory does not exist.
                          Please create the directory.

                          ternyata ada sedikit kesalahan squid dalam membaca directory :
                          '/var/squid/log/yt.log'
                          yang seharusnya di pfsense :
                          /var/squid/logs/yt.log

                          (yang menjadikan squid dan lusca gak mau running)

                          #include.conf
                          strip_query_terms off
                          acl yutub url_regex -i .youtube.com/.$
                          acl yutub url_regex -i .youtu.be/.$

                          logformat squid1 %{Referer}>h %ru

                          access_log /var/squid/logs/yt.log squid1 yutub
                          acl redirec urlpath_regex -i .&redirect_counter=1&cms_redirect=yes
                          acl redirec urlpath_regex -i .
                          &ir=1&rr=12
                          cache deny redirec
                          acl reddeny url_regex -i c.youtube.com/videoplayback.redirect_counter=1.$
                          acl reddeny url_regex -i c.youtube.com/videoplayback.cms_redirect=yes.$
                          storeurl_access deny reddeny

                          #edit storeurl.pl

                          sub GetID
                          {
                          $id = "";
                          use File::ReadBackwards;
                          my $lim = 200 ;
                          my $ref_log = File::ReadBackwards->new('/var/squid/logs/yt.log');
                          while (defined($line = $ref_log->readline))
                          {
                          if ($line =~ m/.youtube./watch?.v=([a-zA-Z0-9-_]).\s.id=$IDS[0]./){
                          $id = $1;
                          last;
                          }
                          if ($line =~ m/.youtube./.cpn=$CPN[0].&=([a-zA-Z0-9-_]
                          )./){
                          $id = $2;
                          last;
                          }
                          if ($line =~ m/.youtube./.
                          &?=([a-zA-Z0-9-_]*).cpn=$CPN[0]./){
                          $id = $2;
                          last;
                          }
                          last if –$lim <= 0;
                          }
                          if ($id eq ""){
                          $id = $IDS[0];
                          }
                          $ref_log->close();
                          return $id;
                          }

                          1 Reply Last reply Reply Quote 0
                          • Q
                            queues
                            last edited by

                            @extreemblank:

                            ngetest readbackward udah terinstall atau belum, bisa pake kode ini:

                            
                            #!/usr/bin/perl
                            use File::ReadBackwards;
                             
                            $fh = File::ReadBackwards->new('/var/squid/log/access.log') or
                            die "can't read file: $!\n";
                             
                            while ( defined($line = $fh->readline) )
                            {
                              print $line ;
                            }
                            
                            

                            simpan dengan nama cobaReadBack.pl

                            lalu jalankan dengan perl cobaReadBack.pl, kalo ReadBackWards udah terinstall dengan baik, maka file squid/log/access.log akan ditampilkan secara terbalik ( dari akhir file ) alias BackWard.. itu sebabnya kang ucok karnadi pake library ini… baca file lognya dari belakang alias baris yang dibaca dulu adalah yang terakhir disimpan / ditambahkan kedalam log. CMIIW

                            cara menjalankannya bagaimana ?

                            @herymulyo
                            mas hery, saya sudah coba mengganti seperti petunjuk mas hery, tetap lusca gak mau berjalan.

                            1 Reply Last reply Reply Quote 0
                            • E
                              extreemblank
                              last edited by

                              saat kita setting proxynya pfsense, yaitu di menu Proxy server: General settings atau kalau di saya di http://192.168.1.1/pkg_edit.php?xml=squid.xml&id=0, tergantung rekan2 set ip interface lan.. kalo saya 19.168.1.1 itu. maka disitu ada pengesetan Log store directory:
                              maka pastikan apa yang tertulis di sana sama dengan yang kita tuliskan juga directory lognya di configurasi tambahan squid… dalam hal ini file storeurl.pl dan include.conf

                              oya jika sudah benar maka coba test di ssh alias terminal: perl cobaReadBack.pl kode simple di atas.. ini hanya untuk menguji library readback ini terpasang baik apa gak saja.

                              jika readback nya belum terinstall maka storeurl pun akan error.

                              1 Reply Last reply Reply Quote 0
                              • O
                                olop99
                                last edited by

                                pengen tanya para mastah

                                proxy ane waktu masukan IP proxy di web browser dia ke cache dengan sempurna dengan 100% HIT tanpa memakan bandwith

                                tetapi pas waktu ane NAT di mikrotik dan IP proxy di hilangkan youtube ke HIT tetapi memakan bandwith…

                                itu kira2 kenapa ya mastah apakah setingan mikrotik ane salah atau kenapa ya...??

                                apa proxy ane juga yang salah ya

                                1 Reply Last reply Reply Quote 0
                                • D
                                  dpa
                                  last edited by

                                  @QueueS:

                                  @dpa:

                                  Hello guys,

                                  I am lost on how to do this: install package dependencies "apt-get install libfile-readbackwards-perl"

                                  Please help. thanks!

                                  Regards

                                  what ur pfsense version? amd or intel?

                                  I already get it, thanks to you all!  ;)

                                  1 Reply Last reply Reply Quote 0
                                  • P
                                    poscom
                                    last edited by

                                    pkg_info perl…

                                    perl-5.10.1_3     
                                    perl-5.12.3

                                    new...perl-5.14.2_2

                                    1 Reply Last reply Reply Quote 0
                                    • O
                                      olop99
                                      last edited by

                                      mastah pengen tanya nih gans..

                                      gimana sih ACLnya untuk ngeBLOK IDM..??

                                      klo ada tolong kasih tau dong mas

                                      soalnya butuh banget ini…

                                      terima kasih

                                      1 Reply Last reply Reply Quote 0
                                      • E
                                        eyditharen
                                        last edited by

                                        blom jalan juga kalo pake storeurl tolong di kasi cara nge check perl, ato package yg blom terinstall dengan benar sehingga ngak bisa di jalan kan

                                        1 Reply Last reply Reply Quote 0
                                        • E
                                          eyditharen
                                          last edited by

                                          mohon di gelar supaya yg laen bisa nyoba n ngereview

                                          1 Reply Last reply Reply Quote 0
                                          • O
                                            onomlakbok
                                            last edited by

                                            @ucok_karnadi:

                                            gak usah susah susah, pakai storeurl lama dah tercache, karena youtube kembali menjadi static ID

                                            happy caching brotha.

                                            storeurl lama
                                            https://tempat-sampah.googlecode.com/svn-history/r17/storeurl.pl

                                            Thx om dah mampir dan atas pencerahanya
                                            test by me hanya mengganti storeurl.pl dengan storeurl lama youtube langsung HIT monggo d coba temen"

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.