Linux: FreeBSD + FreeRadius + MySQL March 7th, 2010
Compiling the Kernel
After installing FreeBSD, compiling the kernel.
Via sysinstall:
# Sysinstall
Configure
Distributions
[x] src
[x] sys
# Cd / sys/i386/conf /
Hostname # cp GENERIC
Hostname # ee
Include at the end of file:
# firewall options IPFIREWALL
options IPFIREWALL_VERBOSE # enable logging to syslogd (8)
options IPFIREWALL_VERBOSE_LIMIT = 100 # limit verbosity
options IPFIREWALL_DEFAULT_TO_ACCEPT # allow everything by default
options IPFIREWALL_FORWARD # packet destination changes
IPFILTER options
IPFILTER_LOG options
options IPDIVERT # divert sockets
options IPSTEALTH # support for stealth forwarding
DUMMYNET options
options HZ = 1000
ALTQ options
options ALTQ_CBQ # Class Bases Queuing
options ALTQ_RED # Random Early Drop
options ALTQ_RIO # RED In / Out
# options ALTQ_HFSC Hierarchical Packet Scheduler
options ALTQ_CDNR # Traffic conditioner
options ALTQ_PRIQ # Priority Queuing
netgraph options
NETGRAPH_PPPOE options
NETGRAPH_SOCKET options
NETGRAPH_IFACE options
options BRIDGE
# Config SEUKERNEL
# Cd .. / compile / SEUKERNEL
# Make depend
# Make
# Make install
# Reboot
Update the ports
Update the ports before you begin installing the packages:
# Portsnap fetch extract
Installing PPPoE
Edit the file:
# Ee / etc / ppp / ppp.conf
Delete everything and paste the configs below:
Ppp.conf ######## ########
BEGIN ######### ##########
default:
set log Chat Command Phase # Enables the client logged.
# enable pap pap Enables authentication (password authentication protocol)
enable chap # Activate account CHAP (Challenge Handshake Authentication Protocol)
# enable echo Sending LCP echos (Check if the link is active)
# 5 September echoperiod Shipping time for each echo (After 5 failures the tun is disconnected)
allow mode direct # Turn on ppp bridging
enable proxy # Enables ppp proxyarping
# How to disable IPV6CP not use IPV6, we do not want their mistakes
September mru 1492 # Set the MRU below 1500
September mtu 1492 # Set the MRU below 1500
September ifaddr 192.168.1.1 192.168.1.2-192.168.1.100 # gateway and range of IPs
set speed sync #
set timeout 0 #
enable lqr #
accept dns # DNS accepted
September radius / etc / radius.conf # Active Radius and specifies where the connection file
END ########### ##########
Ppp.conf ######## ########
Edit / etc / radius.conf (create this file).
RADIUS.CONF ###### ######
BEGIN ######### #########
# # # # type # # # # server password # ######
auth localhost senharadius
acct localhost senharadius Read the rest of this entry »
Installing and configuring daloRADIUS March 6th, 2010
With FreeRADIUS+MySQL installed, it’s now turn to install daloRADIUS; a web-based management system for FreeRADIUS. Before installation, ensure that Apache, PHP and MySQL have been installed and running. You’ll need PHP PEAR as well. Use the following command to install the required libs:
# apt-get install php-pear
# pear install DB
Get the latest version of daloRADIUS from http://sourceforge.net/projects/daloradius/files/. Extract the tarball to /var/www/daloradius. You’ll need to import daloRADIUS DB schema from /var/www/daloradius/contrib/db/mysql-daloradius.sql:
# mysql -u root -p radius < mysql-daloradius.sql
Even after importing the schema, there seems to be a missing table i.e. usergroup. Get the missing table schema from fr1-mysql-freeradius.sql in the same directory. Once the table has been imported, edit the /var/www/daloradius/library/daloradius.conf.php for DB access credentials.
Access the daloRADIUS installation via a web browser at http://<hostname>/daloradius. Login as administrator/radius.
You should now have a working daloRADIUS installation.
source here
Posted in debian, linux, Networking, ubuntu | No Comments »
Installing and configuring FreeRADIUS with MySQL authentication March 6th, 2010
Here’s a *near* step-by-step guide to setup FreeRADIUS with MySQL backed authentication done on Ubuntu 9.10 (Karmic). Start by installing the necessary deb files:
# apt-get install freeradius freeradius-mysql
Add the following lines to the /etc/freeradius/users file:
abc Cleartext-Password := “123″
Stop freeradius service just in case:
/etc/init.d/freeradius stop
Now test using the radtest client:
# radtest abc 123 localhost 1812 testing123
Sending Access-Request of id 149 to 127.0.0.1 port 1812
User-Name = “abc”
User-Password = “123″
NAS-IP-Address = 208.67.219.132
NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=149, length=20
Ensure that the response is “Access-Accept”. The following should be displayed at the server console: Read the rest of this entry »
