Intall Package
- apache2
- php5-common php5-gd php-pear php-db libapache2-mod-php5 php5-mysql php5-mcrypt
- mysql-server-5.5 mysql-client-5.5
- phpmyadmin
- freeradius freeradius-mysql
Import table database
# mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql
Enter password:
# mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql
Enter password:
Membuat database
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 693
Server version: 5.0.67-0ubuntu6 (Ubuntu)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> create database radius;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on radius.* to radius@localhost identified by “radpass”;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
Membuat user
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 693
Server version: 5.0.67-0ubuntu6 (Ubuntu)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> use radius;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> INSERT INTO radcheck (username, attribute, op, value) VALUES ('admin','Cleartext-Password',':=', 'admin123');
Query OK, 1 row affected (0.00 sec)
mysql> exit
Bye
Konfigurasi file /etc/freeradius/sql.conf
Pada connection info
# Connection info:
server = “localhost”
login = “radius”
password = “passwordradius”
Uncomment pada readclients agar NAS dapat dibaca melalui database.
readclients = yes
Mengubah file /etc/freeradius/sites-enabled/default
Uncomment sql pada bagian authorize{}
# See “Authorization Queries” in sql.conf
sql
Uncomment sql pada bagian accounting{}
# See “Accounting queries” in sql.conf
sql
Uncomment sql pada bagian session{}
# See “Simultaneous Use Checking Queries” in sql.conf
sql
Uncomment sql pada bagian post-auth{}
# See “Authentication Logging Queries” in sql.conf
Sql
Pastikan bahwa konfigurasi /etc/freeradius/radiusd.conf dalam keadaan benar.
uncomment # $INCLUDE sql.conf
sehingga jadi $INCLUDE sql.conf
Jalankan freeradius
/etc/init.d/freeradius start
Atau
Freeradius –X
Jalankan test pada server radius localhost
# radtest admin admin123 localhost 1812 testing123
Sending Access-Request of id 9 to 127.0.0.1 port 1812
User-Name = “admin”
User-Password = “admin123”
NAS-IP-Address = 192.168.1.10
NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=9, length=20
Sekian
Posting Komentar