From: Evgeny Ruvinov <evgeny at i-p-hi.com>
Newsgroups: email
Date: Mon, 22 Sep 2004 14:31:37 +0000 (UTC)
Subject: Настройка PPPoE сервера на базе Fedora Core1-2 Linux
PPPoE Configuration on FC1/FC2 HOWTO
HOWTO - Configuration bundle: PPPoE + MySQL + FreeRADIUS + DialUp Admin
on Fedora Core1-2.
Author: Evgeny Ruvinov. (evgeny@i-p-hi.com), 2004
________________________________________
Table of Contents
1. Predefaults.
2. Installing and configure MySQL server.
3. PPPoE server configuration.
4. Installing DialUp-Admin.
Chapter 1. Predefault.
----------------------
We have a server with two network cards. Our settings for example:
WAN: 80.178.114.158
(Mask 255.255.255.252
Network 80.178.114.156
Router 80.178.114.157).
LAN: 192.168.10.1
(Mask 255.255.255.0)
This is only examples - put there your static WAN and LAN IPs, MASKs and GATEs
Our domain: yourdomain.com
Server DN your_DNS_server_IP
We want to install distributive Fedora Core 1 with next services:
- Radius: Freeradius-0.9.3-1.1
- SQL: MySQL-3.23.58-4
- PPPoE-Server: rp-pppoe-3.5-8
Chapter 2. Installing and configure MySQL server.
-------------------------------------------------
First of all you shell check what mysql packages you have install.
# rpm -qa | grep mysql
at list you have get 3 packages:
mysql-3.23.58-4
mysql-server-3.23.58-4
mysql-devel-3.23.58-4
freeradius-mysql-0.9.3-1.1
or newer.
Very important to secure mysql root account.
# mysqladmin password newpassword
(Sure, instead "newpassword" you have to insert YOUR new root password)
Open new database called radius.
# mysqladmin -uroot -pnewpassword create radius
Where "newpassword" - is password for root user of radius
Open new user for radius database administration called radiusadmin and
give appropriative privileges for this account.
# mysql -uroot -p
Enter password: ******
mysql> GRANT ALL PRIVILEGES ON radius.* TO "radiusadmin"@"localhost"
->IDENTIFIED BY "radiuspassword" WITH GRANT OPTION;
mysql> exit
Where "radiuspassword" is your password for user radiusadmin.
# /etc/rc.d/init.d/mysqld start
Chapter 3. FreeRadius server installation, and configuration to work through
MySQL DB.
----------------------------------------------------------------------------
First of all you shell check what freeradius packages you have install.
# rpm -qa | grep freeradius
at list you have get two packages:
freeradius-0.9.3-1.1
freeradius-mysql-0.9.3-1.1
or newer.
After that you have to do some changes in configuration files:
open /etc/raddb/clients.conf
At the end of this file add:
client 192.168.10.0/24 {
secret = mysecret #sure you have to change secret
shortname = mynetwork
}
open /etc/rcd/raddb/sql.
driver = "rlm_sql_mysql" #check that you point to this driver
login = "radiusadmin" #change to your sql root user
password = "radiuspassword" #change to your sql root password
open /etc/rcd/raddb/radiusd.conf
Change:
user: root
group: root
port = 1812
log_auth = yes
log_auth_badpass = yes
In authorize module add
sql between suffix and files
In accounting module add
sql between unix and radutemp
Now you have to get freeradius source from Freeradius download page:
The files are extracted from tarball and moving to /usr/src/ source directory.
Now we have to change radius database:
# mysql -uradiusadmin -pradiuspassword radius < /usr/src/freeradius-0.9.3/src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql
Now we need to add and configure user group or groups in MySQL database
for radius requirements (for example we open group called dialup). Open
database radius and change a few tables:
In table radgroupcheck we add:
id GroupName Attribute Value op
12 dialup Auth-Type PAP :=
Chapter 4. PPPoE server configuration.
--------------------------------------
First of all we have to upgrade the original ppp package, because of
this package don"t consist radiusclient and it have problem with
rp-pppoe.so plug-in.
Open:
# tar -xvzf dialup_admin-1.62.tar.gz -C /usr/local
Open file /etc/httpd/conf/httpd.conf
Add there next rows:
Alias /dialup_admin/ "/usr/local/dialup_admin/htdocs/"
<Directory "/usr/local/dialup_admin/htdocs">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
and restart Apache server:
# /etc/rc.d/init.d/httpd restart
To do some changes
Now we shell configure dialup_admin
Open file /usr/local/dialup_admin/conf/admin.conf and change next rows:
general_prefered_lang: default
general_prefered_lang_name: English
general_domain: yourdomain.com
general_test_account_login: test
general_test_account_password: testpass
sql_username: radiusadmin
sql_password: radiuspassword
Now we have to do some changes in MySQL database:
# mysql -uradiusadmin -pradiuspassword radius < /usr/local/dialup_admin/sql/baduser.sql
# mysql -uradiusadmin -pradiuspassword radius < /usr/local/dialup_admin/sql/mtotacct.sql
# mysql -uradiusadmin -pradiuspassword radius < /usr/local/dialup_admin/sql/totacct.sql
# mysql -uradiusadmin -pradiuspassword radius < /usr/local/dialup_admin/sql/userinfo.sql
So, now we"ve finished all our configurations.
For creation user go to:
http://yourserver.yourdomain/dialup_admin/
After creating pppoe user you can open pppoe connection on client computer.
PS: Thanks to Alex Savguira for help.
575 Прочтений • [Настройка PPPoE сервера на базе Fedora Core1-2 Linux (pppoe fedora linux vpn dialup radius)] [08.05.2012] [Комментариев: 0]