[Tanya] CP - User Daftar Sendiri ?? ?
-
Menyambung threat international tentang CP self Registrations
http://forum.pfsense.org/index.php/topic,57260.0.htmlBagaimanakah adakah yang sudah menerapkannya?
Isi dari link diatas :
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
- 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..
- 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
- in command
/etc/rc.php_ini_setup
- installed freeradius2 package from system/package
- rebooted pfsense
- in command
touch /etc/php_dynamodules/php52-mysql
- 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 phpmyadminI 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.cssand 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.phpin 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.
-
Gambar mysql Kira-kira seperti gambar dibawah ini (attachment)
-
Hasil Copy Paste milik Khan.
Halaman Login dan Halaman Register User kira seperti ini ?
Under Attachment