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

    Tutorial : Per user bandwidth captiveportal (BW berbeda utk spesific username)

    Scheduled Pinned Locked Moved Indonesian
    24 Posts 4 Posters 12.4k 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.
    • A
      anto_DIGIT
      last edited by

      @afry:

      bro anto maaf mohon analisa nya

      _$ ipfw list

      10000 pipe 30002 ip from any to 192.168.2.124 out proto tcp iptos reliability
      10001 pipe 30002 ip from any to 192.168.2.124 out proto tcp iptos reliability
      10002 pipe 30012 ip from any to 192.168.2.124 out proto tcp iptos reliability
      10003 pipe 30002 ip from any to 192.168.2.124 out proto tcp iptos reliability_
      pipe 30012 (192 Kbit/s) diatas dah muncul, tapi kok dibawahnya muncul lagi pipe 30002 (8 Mbit/s)yah?
      hasilnya… user guest masih sama bandwidth nya dengan user lain yang ngak dibates
      terima kasih

      Seharusnya :

      pipe 30012 ip from any to 192.168.2.124 out proto tcp not iptos reliability
      bukan
      pipe 30012 ip from any to 192.168.2.124 out proto tcp iptos reliability

      1 Reply Last reply Reply Quote 0
      • A
        afry
        last edited by

        wah maaf bro kurang teliti saya…
        sesuai petunjuk bro anto akhirnya saya bikin seperti ini :

        _if ($peruserbw && !empty($bw_down) && is_numeric($bw_down)) {
                    $bw_down_pipeno = $ruleno + 45500;
                      if ($username=='guest' or $username=='nugraha_mahardika' or $username=='giaartcraft' or $username=='tess')
        {
                  exec("/sbin/ipfw pipe 30012 config bw 256Kbit/s queue 100");
                                  exec("/sbin/ipfw add $ruleno pipe 30012 all from any to $clientip out not iptos reliability");
        }
        else {
        exec("/sbin/ipfw add $ruleno set 2 pipe $bw_down_pipeno ip from any to $clientip out");
        exec("/sbin/ipfw pipe $bw_down_pipeno config bw {$bw_down}Kbit/s queue 100");
            }

        exec("/sbin/ipfw pipe 30010 config bw 8192Kbit/s queue 100");
                        exec("/sbin/ipfw add $ruleno pipe 30010 all from any to $clientip out proto TCP iptos reliability");

        }
              else
              {
                      exec("/sbin/ipfw add $ruleno set 2 skipto 50000 ip from any to $clientip out");
                      }_

        dan hasil ipfw list

        10000 pipe 50500 ip from 192.168.2.98 to any in
        10000 pipe 30012 ip from any to 192.168.2.98 out not iptos reliability
        10000 pipe 30010 ip from any to 192.168.2.98 out proto tcp iptos reliability
        10005 pipe 50505 ip from 192.168.2.164 to any in
        10005 pipe 55505 ip from any to 192.168.2.164 out
        10005 pipe 30010 ip from any to 192.168.2.164 out proto tcp iptos reliability

        ip 192.168.2.164 login dengan user yang tidak saya batasi
        nah yang membuat saya ragu adalah ip yang 192.168.2.98 (yang dicetak tebal) login dengan user guest( pipe 30012 ), tapi kok pipe nya keluar dua-duanya yah ? ( pipe 30012 sama pipe 30010 ) apakah memang seharus nya seperti itu ?
        atau masih ada yang salah dengan penulisan script saya diatas ?
        Terima kasih…

        1 Reply Last reply Reply Quote 0
        • A
          anto_DIGIT
          last edited by

          memang seperti itu, itu yg satu utk membypass BW limit dari squid ZPH … tentu saja setting squid-nya harus ditambah dulu dengan zph .. sesuai dng tutorial yg .. http://forum.pfsense.org/index.php/topic,26122.0.html

          isikan kode2 ini ke dalam Custom Options di GUI Pfsense : Services --> Proxy Server -- > General

          zph_mode tos;
          zph_local 0x04;
          zph_parent 0;
          zph_option 136;

          tiap IP nanti dapat sepasang :
          iptos reliability – > utk yg ter hit oleh proxy -- > speed 8Mbps
          not iptos reliability -- > utk yg ter belum kena hit proxy -- > speed standar

          1 Reply Last reply Reply Quote 0
          • A
            afry
            last edited by

            @anto_DIGIT:

            memang seperti itu, itu yg satu utk membypass BW limit dari squid ZPH … tentu saja setting squid-nya harus ditambah dulu dengan zph .. sesuai dng tutorial yg .. http://forum.pfsense.org/index.php/topic,26122.0.html

            isikan kode2 ini ke dalam Custom Options di GUI Pfsense : Services --> Proxy Server -- > General

            zph_mode tos;
            zph_local 0x04;
            zph_parent 0;
            zph_option 136;

            tiap IP nanti dapat sepasang :
            iptos reliability – > utk yg ter hit oleh proxy -- > speed 8Mbps
            not iptos reliability -- > utk yg ter belum kena hit proxy -- > speed standar

            wadaw… berarti dah bener yah... Alhamdulillah... beribu terima kasih untuk anda yang tidak bosan merespon setiap pertanyaan..

            Kalau yang ini
            isikan kode2 ini ke dalam Custom Options di GUI Pfsense : Services –> Proxy Server -- > General
            zph_mode tos;
            zph_local 0x04;
            zph_parent 0;
            zph_option 136;

            sudah saya lakukan; kalau merujuk ke http://forum.pfsense.org/index.php/topic,26122.0.html , apakah langkah selanjutnya wajib saya lakukan untuk per user bandwidth ini? karena terus terang saya lom ngerti  membuat rule firewall,
            Langkah 5
            Buatlah firewall rule utk memblok port 3128, karena jika ada salah satu client yg mengisi opsi proxy di browser bisa membypass captiveportal.

            dan saya jga tidak menggunakan/mengaktifkan traffic shaper.. karena emang lom mengerti mengenai itu….

            Terima kasih

            1 Reply Last reply Reply Quote 0
            • A
              anto_DIGIT
              last edited by

              @afry:

              sudah saya lakukan; kalau merujuk ke http://forum.pfsense.org/index.php/topic,26122.0.html , apakah langkah selanjutnya wajib saya lakukan untuk per user bandwidth ini? karena terus terang saya lom ngerti  membuat rule firewall,
              Langkah 5
              Buatlah firewall rule utk memblok port 3128, karena jika ada salah satu client yg mengisi opsi proxy di browser bisa membypass captiveportal.

              dan saya jga tidak menggunakan/mengaktifkan traffic shaper.. karena emang lom mengerti mengenai itu….

              Terima kasih

              Belajar2nya satu-satu dulu ya soalnya di thread ini kan hanya sampai masalah BW … kalau mengenai rule dan traffic shapping sudah banyak yg bahas ...

              Selamat sudah berhasil membuat custom BW management .. Terus terang saya sendiri belum pernah mencoba ini di pfsense 1.2.3 ...

              kalau masalah rule, itu kan sudah adau GUI-nya ... tidak susah asal mau coba ... defaultnya kan semua port dari sisi LAN kan terbuka ..
              Cara lain yg lebih gampang, yaitu merubah port squid 3128 dng port lain yg tdk terpakai ..

              1 Reply Last reply Reply Quote 0
              • A
                afry
                last edited by

                ok bro, thank's atas semua kebaikan dan ilmu yang telah dibagi… hehehe
                terima kasih

                1 Reply Last reply Reply Quote 0
                • A
                  afry
                  last edited by

                  bro maaf mengganggu lagi, setelah ngikutin cara2 diatas… semua sukses... seperti yang telah saya sampaikan, cuman kok semua client yang memakai kabel/tanpa captivePortal downloadnya jadi lemot banget...
                  topologi : internet -----Pfsense----- AP(dengan captive portal)
                                                      |
                                                      |Tanpa CP
                                                Lan Kabel

                  ada pengaruhnya ngak ? kenapa bisa begitu?
                  terima kasih

                  1 Reply Last reply Reply Quote 0
                  • A
                    anto_DIGIT
                    last edited by

                    @afry:

                    bro maaf mengganggu lagi, setelah ngikutin cara2 diatas… semua sukses... seperti yang telah saya sampaikan, cuman kok semua client yang memakai kabel/tanpa captivePortal downloadnya jadi lemot banget...
                    topologi : internet -----Pfsense----- AP(dengan captive portal)
                                                        |
                                                        |Tanpa CP
                                                  Lan Kabel

                    ada pengaruhnya ngak ? kenapa bisa begitu?
                    terima kasih

                    Belum di coba utk multi LAN
                    1. BW dari ISP dapet brp ?
                    2. setting BW di client
                    3. Traddic Shaping aktif ?

                    1 Reply Last reply Reply Quote 0
                    • A
                      afry
                      last edited by

                      @anto_DIGIT:

                      @afry:

                      bro maaf mengganggu lagi, setelah ngikutin cara2 diatas… semua sukses... seperti yang telah saya sampaikan, cuman kok semua client yang memakai kabel/tanpa captivePortal downloadnya jadi lemot banget...
                      topologi : internet -----Pfsense----- AP(dengan captive portal)
                                                          |
                                                          |Tanpa CP
                                                    Lan Kabel

                      ada pengaruhnya ngak ? kenapa bisa begitu?
                      terima kasih

                      Belum di coba utk multi LAN
                      1. BW dari ISP dapet brp ?
                      2. setting BW di client
                      3. Traddic Shaping aktif ?

                      Bw isp = 5Mbps
                      untuk client non captive portal, full bandwidth
                      trafic shaping tidak aktif

                      makasih

                      1 Reply Last reply Reply Quote 0
                      • A
                        anto_DIGIT
                        last edited by

                        @afry:

                        @anto_DIGIT:

                        @afry:

                        bro maaf mengganggu lagi, setelah ngikutin cara2 diatas… semua sukses... seperti yang telah saya sampaikan, cuman kok semua client yang memakai kabel/tanpa captivePortal downloadnya jadi lemot banget...
                        topologi : internet -----Pfsense----- AP(dengan captive portal)
                                                            |
                                                            |Tanpa CP
                                                      Lan Kabel

                        ada pengaruhnya ngak ? kenapa bisa begitu?
                        terima kasih

                        nanti deh dicoba dng konfigurasi spt itu ..

                        Belum di coba utk multi LAN
                        1. BW dari ISP dapet brp ?
                        2. setting BW di client
                        3. Traddic Shaping aktif ?

                        Bw isp = 5Mbps
                        untuk client non captive portal, full bandwidth
                        trafic shaping tidak aktif

                        makasih

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