Pejman Moghadam / Slackware

Slackware 12.0 - Installaing FreeRadius 1.1.7

Public domain


Installation

cd /usr/src
wget 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 
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

/etc/ld.so.conf

/usr/local/freeradius/lib

/usr/local/freeradius/etc/raddb/users

    pejman User-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

Startup

ldconfig
/usr/local/freeradius/sbin/radiusd

Debug Mode

/usr/local/freeradius/sbin/radiusd -X

radclient

# echo User-Name = "pejman", User-Password = "123456" | /usr/local/freeradius/bin/radclient 127.0.0.1 auth testing123
  Received response ID 55, code 2, length = 71
        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
        Filter-Id = "std.ppp"
        Framed-MTU = 1500
        Framed-Compression = Van-Jacobson-TCP-IP

radtest

# /usr/local/freeradius/bin/radtest pejman  123456 127.0.0.1 10 testing123
Sending Access-Request of id 2 to 127.0.0.1 port 1812
        User-Name = "pejman"
        User-Password = "123456"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 10
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=2, length=71
        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
        Filter-Id = "std.ppp"
        Framed-MTU = 1500
        Framed-Compression = Van-Jacobson-TCP-IP

Test from windows

1- Download NTRadPing from http://www.mastersoft-group.com/download/
2- add to /usr/local/freeradius/etc/raddb/clients.conf

  client 172.16.20.254 {
    secret = testing123
    shortname = Windows
    nastype = other
  }

FreeRADIUS Simultaneous-Use with Cisco AS5300

  1- AS5300 config :

       snmp-server community snmp123 RO

  2- add to clients.conf :

       client 192.168.1.2 {
         secret = radsecret
         nastype = cisco
         shortname = AS5300
       }

  3- add to naspasswd :

       192.168.1.2 SNMP snmp123

BY: Pejman Moghadam
TAG: freeradius, radius
DATE: 2009-04-25 00:19:38


Pejman Moghadam / Slackware [ TXT ]