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 202.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.
    • B
      bato234
      last edited by

      mohon petunjuk master….(post diatas)  ;D

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

        refresh…............

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

          bagaimana kelanjutannya nih…??

          koq pada diem ya

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

            MASTER2 COMENT DIKIT…..
            ;D

            1 Reply Last reply Reply Quote 0
            • U
              uyung_vankeeh
              last edited by

              AGAK LAMBAT RESPECT DARI FORUM LAENNYA

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

                @reezq665:

                @serangku:

                repot deh kalo maenan dengan youtube2 an …

                kembali ke konsep awal lagi saja, sembari ngarepin koneksi broadband di kita terus membaik.
                after all ... emang jadi tantangan tersendiri dan kepuasan tersendiri juga ngoprek untuk terus2 an berusaha HIT
                pasti akan sampe pada titik boring deh ...

                keep explore, happy oprek ...

                Om Serangku, ada clue dari Om Syaifuddin JW….
                Mudah2an bisa diterapkan di Pfsense....

                di U***** server:
                build squid dengan opsi "–enable-referer-log"
                lalu install paket pendukungnya
                apt-get install libfile-readbackwards-perl

                squid config
                referer_log /var/log/squid/referer.log

                storeurl.pl (revisi untuk youtube yg sudah ada)

                kode pastebin http://pastebin.com/TGLBtZ5Z

                dan bagian akhir file  tambahkan ini

                sub GetID{
                use File::ReadBackwards;
                my $ref_log = File::ReadBackwards->new('/var/log/squid/referer.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./ptracking.cpn=$CPN[0].video_id=([a-zA-Z0-9-_])./){
                $id = $1;
                last;
                }
                if ($line =~ m/.youtube./ptracking.video_id=([a-zA-Z0-9-_]).cpn=$CPN[0]./){
                $id = $1;
                last;
                }
                }
                $ref_log->close();
                return $id;
                }

                Menunggu pencerahan dari Om Master2 PFSENSE….berharap mode on

                use File::ReadBackwards;

                buat baca file per line, masalahnya gak include di standard perl nih, harus di install pake pkg-add

                ni masalah PACKAGESITE source ftpnya freebsd di kutak katik sama pfsense kadang nambah package2 std freebsd aja jadi unable to fetch bla..blah gitu..

                hmm.. stay tune.

                brb.

                1 Reply Last reply Reply Quote 0
                • 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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.