Public domain
cd /usr/src
wget -c ftp://ftp.freeradius.org/pub/radius/freeradius-1.1.7.tar.gz
tar zxf freeradius-1.1.7.tar.gz
cd freeradius-1.1.7
./configure --prefix=/usr/local/freeradius && make && make install
if ! grep -q freeradius /etc/ld.so.conf ; then
echo "/usr/local/freeradius/lib" >> /etc/ld.so.conf
fi
ldconfig
ln -sfn /usr/local/freeradius/etc/raddb /etc/raddb
cp /usr/local/freeradius/etc/raddb/users{,.bak}
egrep -v '^#|^ *$' /usr/local/freeradius/etc/raddb/users.bak > /usr/local/freeradius/etc/raddb/users
cp /usr/local/freeradius/etc/raddb/radiusd.conf{,.bak}
cd /usr/local/freeradius/etc/raddb/
sed -e 's,#.*,,' -e 's,^[ \t]*$,,' radiusd.conf.bak | egrep -v '^ *$' > radiusd.conf
pejman Password := "123456"
Service-Type = Framed-User,
Framed-Protocol = PPP,
# Framed-IP-Address = 172.16.3.33,
# Framed-IP-Netmask = 255.255.255.0,
# Framed-Routing = Broadcast-Listen,
# Framed-Filter-Id = "std.ppp",
# Framed-MTU = 1500,
Framed-Compression = Van-Jacobsen-TCP-IP
DEFAULT Auth-Type = System
Fall-Through = 1
DEFAULT Service-Type == Framed-User
Framed-IP-Address = 255.255.255.254,
Framed-MTU = 576,
Service-Type = Framed-User,
Fall-Through = Yes
DEFAULT Framed-Protocol == PPP
Framed-Protocol = PPP,
Framed-Compression = Van-Jacobson-TCP-IP
DEFAULT Hint == "CSLIP"
Framed-Protocol = SLIP,
Framed-Compression = Van-Jacobson-TCP-IP
DEFAULT Hint == "SLIP"
Framed-Protocol = SLIP
#!/bin/sh
#
# /etc/rc.d/rc.radiusd
#
case "$1" in
'start')
echo 'Starting radiusd ...'
PID=$(pgrep '^radiusd$')
if [ "$PID" == "" ] ; then
/usr/local/freeradius/sbin/radiusd
else
echo 'radiusd is already running !!!'
fi
;;
'stop')
echo 'Stoping radiusd ...'
killall radiusd
;;
'restart')
echo 'Restarting radiusd ...'
killall radiusd
sleep 2
/usr/local/freeradius/sbin/radiusd $2
;;
'debug')
echo 'Debuging radiusd ...'
PID=$(pgrep '^radiusd$')
if [ "$PID" == "" ] ; then
/usr/local/freeradius/sbin/radiusd
else
echo 'radiusd is already running !!!'
fi
;;
*)
echo "Usage: $0 [start|stop|restart|debug]"
;;
esac
ATTRIBUTE CHAP-Challenge 60 string
INCLUDE /etc/radiusclient/dictionary.microsoft
localhost testing123
mv /etc/ppp/options{,.bak}
mv /etc/ppp/pppoe-server-options{,.bak}
lock
require-chap
noipdefault
mru 1492
mtu 1492
lcp-max-configure 60
lcp-restart 2
lcp-echo-interval 30
lcp-echo-failure 4
idle 0
noipx
proxyarp
ms-dns 80.191.194.18
plugin radius.so
plugin radattr.so
#debug dump logfd 2 nodetach
LINUX_PLUGIN=/usr/lib/pppd/2.4.4/rp-pppoe.so
#!/bin/bash
#
# /etc/rc.d/rc.pppoe-server
#
# Configuration
SRVNAME="Linux-PPPOE-Server"
MAXCON=250
LOCALIP=10.0.0.1
STARTIP=10.0.0.10
USRIF=eth1
HOSTNAME=$(hostname)
start ()
{
modprobe pppoe
ifconfig $USRIF up
/usr/sbin/pppoe-server -k -I $USRIF -N $MAXCON -C $HOSTNAME -S $SRVNAME -L $LOCALIP -R $STARTIP
}
case "$1" in
'start')
echo 'Starting pppoe-server ...'
PID=$(pgrep '^pppoe-server$')
if [ "$PID" == "" ] ; then
start
else
echo 'pppoe-server is already running !!!'
fi
;;
'stop')
echo 'Stoping pppoe-server ...'
killall pppoe-server
;;
'restart')
echo 'Restarting pppoe-server ...'
killall pppoe-server
sleep 2
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac
# Start FreeRADIUS server:
if [ -x /etc/rc.d/rc.radiusd ]; then
/etc/rc.d/rc.radiusd start
fi
# Start PPPOE server:
if [ -x /etc/rc.d/rc.pppoe-server ]; then
/etc/rc.d/rc.pppoe-server start
fi
#!/bin/bash
# Stop PPPOE server:
if [ -x /etc/rc.d/rc.pppoe-server ]; then
/etc/rc.d/rc.pppoe-server stop
fi
# Stop FreeRADIUS server:
if [ -x /etc/rc.d/rc.radiusd ]; then
/etc/rc.d/rc.radiusd stop
fi
chmod +x /etc/rc.d/rc.local_shutdown
chmod +x /etc/rc.d/rc.radiusd
/etc/rc.d/rc.radiusd start
chmod +x /etc/rc.d/rc.pppoe-server
/etc/rc.d/rc.pppoe-server start
echo User-Name = "pejman", User-Password = "123456" | /usr/local/freeradius/bin/radclient 127.0.0.1 auth testing123
/usr/local/freeradius/bin/radtest pejman 123456 127.0.0.1 10 testing123
localhost testing123
authserver localhost
acctserver localhost
ATTRIBUTE CHAP-Password 3 string
ATTRIBUTE CHAP-Challenge 60 string
mv /etc/ppp/options{,.bak}
mv /etc/ppp/pppoe-server-options{,.bak}
#syncmap 0
#crtscts
#lock
#modem
LINUX_PLUGIN=/usr/lib/pppd/2.4.4/rp-pppoe.so
require-chap
noipdefault
mru 1492
mtu 1492
lcp-max-configure 60
lcp-restart 2
lcp-echo-interval 30
lcp-echo-failure 4
idle 0
noipx
proxyarp
ms-dns 4.2.2.4
plugin radius.so
plugin radattr.so
#debug dump logfd 2 nodetach
#!/bin/bash
#
# /etc/rc.d/rc.pppoe-server
#
# Start/stop/restart the RP-PPPOE server.
#
# To make pppoe-server start automatically at boot, make this
# file executable: chmod +x /etc/rc.d/rc.pppoe-server
#
# Configuration
SRVNAME="RH-WR"
MAXCON=250
LOCALIP=10.0.0.1
STARTIP=10.0.0.10
EXTIF=eth0
USRIF=eth1
HOSTNAME=$(hostname)
start ()
{
modprobe pppoe
ifconfig $USRIF 0.0.0.0 up
/usr/sbin/pppoe-server -k -I $USRIF -N $MAXCON -C $HOSTNAME -S $SRVNAME -L $LOCALIP -R $STARTIP
}
case "$1" in
'start')
echo 'Starting pppoe-server ...'
PID=$(pgrep '^pppoe-server$')
if [ "$PID" == "" ] ; then
start
else
echo 'pppoe-server is already running !!!'
fi
;;
'stop')
echo 'Stoping pppoe-server ...'
killall pppoe-server
;;
'restart')
echo 'Restarting pppoe-server ...'
killall pppoe-server
sleep 2
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac
# Start pppoe-server :
if [ -x /etc/rc.d/rc.pppoe-server ]; then
/etc/rc.d/rc.pppoe-server start
fi
# Stop pppoe-server :
if [ -x /etc/rc.d/rc.pppoe-server ]; then
/etc/rc.d/rc.pppoe-server stop
fi
chmod +x /etc/rc.d/rc.local_shutdown
chmod +x /etc/rc.d/rc.pppoe-server
/etc/rc.d/rc.pppoe-server start
BY: Pejman Moghadam
TAG: freeradius, pppoe-server, radiusclient, radius
DATE: 2009-09-13 10:50:20