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

    [Tanya] CP - User Daftar Sendiri ?? ?

    Scheduled Pinned Locked Moved Indonesian
    3 Posts 1 Posters 3.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.
    • P
      pfz
      last edited by

      Menyambung threat international tentang CP self Registrations
      http://forum.pfsense.org/index.php/topic,57260.0.html

      Bagaimanakah adakah yang sudah menerapkannya?

      Isi dari link diatas :

      @khan:

      Captive Portal Self Registration Using Free radius & Mysql Tested with 2.0.2-RELEASE (i386) built on Fri Dec 7 16:30:14 EST 2012 in vmware 8.

      Caution : this procedure was perfect for me. Please use at your own risk & make backup.

      You need few thing to do this

      1. php-mysql support in pfsense. Default is disabled. follow this post to do it

      http://forum.pfsense.org/index.php/topic,47150.0.html

      your command should be

      pkg_info -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-mysql-5.2.13_3.tbz

      and

      pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-mysql-5.2.13_3.tbz

      tips: according to his (sash99) post some package dependencies should occur. But I did not found 1. what I did..

      1. in command added package with

      pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-mysql-5.2.13_3.tbz

      1. in command

      /etc/rc.php_ini_setup

      1. installed freeradius2 package from system/package
      2. rebooted pfsense
      3. in command

      touch /etc/php_dynamodules/php52-mysql

      1. rebooted pfsense.

      Step 2
      Config pfsense freeradius according to this doc
      http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package
      and for sql  support
      http://forum.pfsense.org/index.php/topic,43675.msg235475.html#msg235475
      add extra table using reg_users.sql.txt file sql command or u can rename this to reg_users.sql and import via phpmyadmin

      I hav added database file  also.

      step 3

      now rename every file & remove “.txt” from file name ie

      captiveportal-cp_reg_suc.php.txt to captiveportal-cp_reg_suc.php
      captiveportal-bootstrap.min.css.txt to captiveportal-bootstrap.min.css

      and so …

      now edit
      captiveportal-cp_reg_suc.php in line 104 insert your sql server ipaddress & password.

      Upload evry file in captive file manager except
      cp_portal.php
      cp_error.php

      in captive portal main page
      enable captive portal in Lan
      check Disable concurrent logins
      in Authentication section
      check RADIUS Authentication
      in ipaddress box –----------- 127.0.0.1
      port box ----------- 1812
      sharedsecret box -----------your shared secret
      in Accounting check send RADIUS accounting packets
      in port ----------- 1813
      Accounting updates ----- check strat stop
      In RADIUS NAS IP attribute select your lan.

      insert cp_portal.php in “Portal page contents”
      cp_error.php in “Authentication error page contents”.
      Save. And you are ready to go.

      Important
      1. you should change php file content according to your need.

      2. be aware about adding php-mysql package you may not be lucky as i was. if anything goes wrong follow "sash99" post carefully.

      3. in my captive portal page i have some security like a client with a mac address can only register one account.

      please let me know your experiences.

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

        Gambar  mysql  Kira-kira seperti gambar dibawah ini (attachment)

        mysqlgambar1.JPG
        mysqlgambar1.JPG_thumb
        mysqlgmbr2.JPG
        mysqlgmbr2.JPG_thumb

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

          Hasil Copy Paste milik Khan.

          Halaman Login dan Halaman Register User kira seperti ini ?
          Under Attachment

          cplogin.JPG
          cplogin.JPG_thumb
          cplogin3.JPG
          cplogin3.JPG_thumb

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