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

    Tutorial Proxy Hit supaya tidak terlimit oleh captive portal (PFsense 1.2.3)

    Scheduled Pinned Locked Moved Indonesian
    23 Posts 5 Posters 18.5k 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

      @111ichael:

      @anto_DIGIT:

      @111ichael:

      om anthon, gmna ya mau cek kalo hit proxy tidak kena limit captive portal?

      sudah ada paket yg terdeteksi melalui :

      tcpdump -nvi re0 | grep 'tos 0x4'

      Kalau sudah ada cek dari status traffic graph ..
      Terlebih dulu di browser spt mozilla / IE dsb .. "clear recent history" atau "clear cache"

      mestinya kalau ter-hit BW akan melebihi batas dari BW limitter .. dan yg tidak, tidak boleh melebihi batas  tsb…

      Kalau sudah menginstall youtube cache, lebih mudah lagi ketauan ...
      Atau download file, juga bisa ketauan ...
      Tapi itu semua tergantung konfigurasi squid kita masing2 ..

      udah 24 jam di tes om… mantab... hit proxynya tidak terlimit...... makasih ya.... maju terus komunitas pfsense indonesia!!!
      ;)

      Wah, berhasil ya ..
      Terus terang modifikasi di atas sebetulnya belum pernah coba sendiri di pfsense 1.2.3 .. hanya berdasar cara yg sudah pernah dilakukan di pfsense 2.0 beta3

      1 Reply Last reply Reply Quote 0
      • Z
        zass
        last edited by

        kalau tanpa settingan begini –> http://forum.pfsense.org/index.php/topic,18823.0.html - maka traffic shaper queues  p2p masuk dalam qlandef atau tidak ?

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

          @zass:

          kalau tanpa settingan begini –> http://forum.pfsense.org/index.php/topic,18823.0.html - maka traffic shaper queues  p2p masuk dalam qlandef atau tidak ?

          sebetulnya yg bermasalah hanya http yg masuk ke qlandef , selain itu tidak ..  karena rule utk transparent proxy hanya mengutak-atik TCP dest port 80 …

          1 Reply Last reply Reply Quote 0
          • 1
            111ichael
            last edited by

            mau tanya nih… klo proxy hit di terapkan di pf 2.0 gmn ya? apa sma dengan yang di 1.2.3?

            memang yg 2.0 bugnya msh ada untuk captive portalnya... udah pernah dicoba...

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

              @111ichael:

              mau tanya nih… klo proxy hit di terapkan di pf 2.0 gmn ya? apa sma dengan yang di 1.2.3?

              memang yg 2.0 bugnya msh ada untuk captive portalnya... udah pernah dicoba...

              hampir sama, tetapi kalau di versi 2 filenya beda … /etc/inc/captiveportal.inc

              Redirectnya masih problem, tapi  developernya kok bilangnya spt ini ..
              http://forum.pfsense.org/index.php/topic,25476.0.html
              Going to need a lot more info than "it doesn't work". It does work in every scenario I have setup, and we've deployed it in production in the past week for a WISP on several systems with multiple VLANs on each and no problems. I suspect at this point if it doesn't work you don't have things setup right for DNS to function, hence are never hitting the firewall to get redirected.

              1 Reply Last reply Reply Quote 0
              • 1
                111ichael
                last edited by

                @anto_DIGIT:

                @111ichael:

                mau tanya nih… klo proxy hit di terapkan di pf 2.0 gmn ya? apa sma dengan yang di 1.2.3?

                memang yg 2.0 bugnya msh ada untuk captive portalnya... udah pernah dicoba...

                hampir sama, tetapi kalau di versi 2 filenya beda … /etc/inc/captiveportal.inc

                Redirectnya masih problem, tapi  developernya kok bilangnya spt ini ..
                http://forum.pfsense.org/index.php/topic,25476.0.html
                Going to need a lot more info than "it doesn't work". It does work in every scenario I have setup, and we've deployed it in production in the past week for a WISP on several systems with multiple VLANs on each and no problems. I suspect at this point if it doesn't work you don't have things setup right for DNS to function, hence are never hitting the firewall to get redirected.

                Sebenarnya pada saat login sdh bisa, usernya yg login sudah masuk di statusnya captive portal, tapi disisi user/client pada saat selesai login akan teredireck ke halaman login kembali, itu jika saya aktifkan 'enable popup logout windows'. kalo tdk di aktifkan redirectnya akan berjalan normal.

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

                  @111ichael:

                  Sebenarnya pada saat login sdh bisa, usernya yg login sudah masuk di statusnya captive portal, tapi disisi user/client pada saat selesai login akan teredireck ke halaman login kembali, itu jika saya aktifkan 'enable popup logout windows'. kalo tdk di aktifkan redirectnya akan berjalan normal.

                  Tks infonya .. tadinya sekitar 2 bulan lalu tdk ada masalah walaupun diaktifkan 'enable popup logout windows' …

                  1 Reply Last reply Reply Quote 0
                  • 1
                    111ichael
                    last edited by

                    @anto_DIGIT:

                    lihat di baris 290, kemudian sesuaikan menjadi seperti di bawah ini :

                    _**if ($peruserbw && !empty($bw_down) && is_numeric($bw_down)) {
                                $bw_down_pipeno = $ruleno + 45500;

                    exec("/sbin/ipfw pipe 30002 config bw 4Mbit/s");
                                exec("/sbin/ipfw add $ruleno set 2 pipe $bw_down_pipeno ip from any to $clientip out not iptos reliability");
                                exec("/sbin/ipfw pipe $bw_down_pipeno config bw {$bw_down}Kbit/s queue 100");

                    exec("/sbin/ipfw add $ruleno pipe 30002 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");**
                    Bandwidth utk proxy-hit diset 4Mbps, silakan sesuaikan dengan kebutuhan dan kemampuan alat ..
                    Save, lalu captiveportal direstart, atau di klik lagi tombol "save"

                    om anto saya sedang mencoba rule bandwidth iptos nya di set per ip. tinggal dilihat apa bisa jalan juga jika di rulenya di setting seperti ini… ^_^

                    _**if ($peruserbw && !empty($bw_down) && is_numeric($bw_down)) {
                                $bw_down_pipeno = $ruleno + 45500;
                                $bw_down_pipeno_tos = $ruleno + 30000;

                    exec("/sbin/ipfw add $ruleno set 2 pipe $bw_down_pipeno ip from any to $clientip out not iptos reliability");
                                exec("/sbin/ipfw pipe $bw_down_pipeno config bw {$bw_down}Kbit/s queue 100");
                         
                          exec("/sbin/ipfw add $ruleno set 2 pipe $bw_down_pipeno_tos ip from any to $clientip out proto TCP iptos reliability");
                                exec("/sbin/ipfw pipe $bw_down_pipeno_tos config bw 4Mbit/s");**__

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

                      silakan dicoba ..  ;D

                      1 Reply Last reply Reply Quote 0
                      • K
                        kakashi
                        last edited by

                        bro …

                        tcpdump -nvi re0 | grep 'tos 0x4'
                        atau tos 0x04 ?

                        saya coba tcpdump -nvi fxp0 tanpa tambahan | grep 'tos 0x4'
                        munculnya tos 0x0, gak nongol yg 0x04 ataupun 0x4

                        mohon pencerahan ...

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

                          @kakashi:

                          bro …

                          tcpdump -nvi re0 | grep 'tos 0x4'
                          atau tos 0x04 ?

                          saya coba tcpdump -nvi fxp0 tanpa tambahan | grep 'tos 0x4'
                          munculnya tos 0x0, gak nongol yg 0x04 ataupun 0x4

                          mohon pencerahan ...

                          Kalau itu tdk muncul, kemungkinan proxy mungkin belum ditandai, atau karena rule yg salah (cek di tmp/rules.debug)
                          lihat squid.conf  ..
                          bisa juga karena disable "Allow users on interface"

                          1 Reply Last reply Reply Quote 0
                          • S
                            serangku
                            last edited by

                            ini ada sedikit pencerahan setelah googling2 …
                            berhubungan dengan tos dan dscp

                            http://www.oneunified.net/blog/Networks/index.blog

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

                              @serangku:

                              ini ada sedikit pencerahan setelah googling2 …
                              berhubungan dengan tos dan dscp

                              http://www.oneunified.net/blog/Networks/index.blog

                              Tks infonya ..

                              Di pfsense beta4, sudah dicoba sekalipun ipfw sudah berhasil mendeteksi TOS tertentu, tetapi PF tidak bisa mendeteksi. Floating rule juga belum berfungsi maksimal, apalagi digabungkan dng layer 7.
                              Bagi rekan2 yg mau coba implementasikan ke versi 1.2.3, silakan memasukkan

                              pass out quick on rl0 from any to 192.168.10.0/24 tos 0x04 no state queue dn_cache

                              masukkan ke /etc/inc/filter.inc
                              jangan lupa utk sesuaikan
                              rl0 –- > interface LAN
                              dn_cache ---> queue, sebelumnya harus dibuat dulu ..
                              tos 0x4 ---> khusus utk di posting ini, silakan sesuaikan jika menggunakan tos lain ..

                              1 Reply Last reply Reply Quote 0
                              • S
                                serangku
                                last edited by

                                om @anto_DIGIT  …

                                baru ada kesempatan oprek2 lagi ...
                                dengan segala keterbatasan saya pgn coba lebih lanjut how tonya punya om
                                sambil sharing dan diskusi yah om ...

                                yg masih aneh di saya, pake tos 0x04 belum nongol juga di tcpdump ... sptnya ada settingan yg salah, install ulang sptnya lebih afdol :)
                                btw ... di mesin yg lain, saya pakekan tos 0x30 ... langsung nongol dia di tcpdump ...
                                oh iya, konsep saya sedikit berbeda ... mohon dikoreksi
                                pf 1.2.3 sy jadikan firewall dan squid. untuk benwith managemennya sy pake mesin yg lain. kira2 spt ini topologinya :
                                inet --- pf 1.2.3 (squid) --- Router Benwith Mngement (router BM)--- switch --- Klien

                                terpaksa di pakekan 1 router BM lagi untuk management benwithnya,
                                logika dan asumsi saya bahwa mesin pf dan squid tanpa ada batasan apapun, open benwith, setelah masuk ke router BM, disitulah nanti di manage benwithnya.
                                tos 0x30 dscp nya 12 atau ...
                                tos 0x04 dscpnya 8 atau ...
                                rada gak mudeng baca dan konvert nya ...

                                thanks ...
                                insya allah berlanjut

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

                                  @serangku:

                                  om @anto_DIGIT  …

                                  baru ada kesempatan oprek2 lagi ...
                                  dengan segala keterbatasan saya pgn coba lebih lanjut how tonya punya om
                                  sambil sharing dan diskusi yah om ...

                                  yg masih aneh di saya, pake tos 0x04 belum nongol juga di tcpdump ... sptnya ada settingan yg salah, install ulang sptnya lebih afdol :)
                                  btw ... di mesin yg lain, saya pakekan tos 0x30 ... langsung nongol dia di tcpdump ...

                                  Selama mencoba, tcpdump memang selalu berhasil.

                                  @serangku:

                                  oh iya, konsep saya sedikit berbeda … mohon dikoreksi
                                  pf 1.2.3 sy jadikan firewall dan squid. untuk benwith managemennya sy pake mesin yg lain. kira2 spt ini topologinya :
                                  inet --- pf 1.2.3 (squid) --- Router Benwith Mngement (router BM)--- switch --- Klien

                                  terpaksa di pakekan 1 router BM lagi untuk management benwithnya,
                                  logika dan asumsi saya bahwa mesin pf dan squid tanpa ada batasan apapun, open benwith, setelah masuk ke router BM, disitulah nanti di manage benwithnya.
                                  tos 0x30 dscp nya 12 atau ...
                                  tos 0x04 dscpnya 8 atau ...
                                  rada gak mudeng baca dan konvert nya ...

                                  thanks ...
                                  insya allah berlanjut

                                  Kalau 2 mesin lebih baik, tetapi kurang bersahabat dalam pemakaian energi. Kalau pakai macam rb7650, bagi yg sudah OK2 saja, tapi bagi yg belum punya pasti harus menambah anggaran lagi.
                                  Tapi sepanjang pengoperasian sistem dng mesin tunggal pfsense 2.0 beta4, client rata2 puas, browsing dan game oline OK2 saja.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    serangku
                                    last edited by

                                    ok di lanjut …

                                    TOS hec 0x30 = TOS dec 48 = DSCP bin 001100 = DSCP hex 0×0C = DSCP dec 12 = DSCP class af12
                                    TOS hec 0x20 = TOS dec 32 = DSCP bin 001000 = DSCP hex 0×08 = DSCP dec 8 = DSCP class cs1
                                    TOS hec 0x40 = TOS dec 64 = DSCP bin 010000 = DSCP hex 0x10 = DSCP dec 10 = DSCP class cs2

                                    3 macem tos2 an diatas yg saya pake ujicoba ...
                                    dari tcpdump yg lsg ter marking packet nya adalah 0x30 kemudian 0x20 dan takhir 0x40
                                    kemudian di padukan dengan L7 filter untuk mendeteck paket yg tdk terdetek oleh sebelumnya.

                                    kesimpulan sementara : tos 0x30 yang dipake dipadu L7 filter, setelah adanya paket marking hit dr cache, diluncurkan dalam Mbps.

                                    sedikit skrinsut dr koneksi paket speedy exec :

                                    sementara itu yg bisa dilaporkan …
                                    ada yg tahu pattern dari idman ?

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