[ Flareon @ 03.10.2013. 21:50 ] @
podigao daloRadius na fedori15, sve funkcionise osim konekcije rb433 sa radiusom .

kako nadjoh u jednom tutoru, tako i uradio ali nema funkcije :/

To enable Mikrotik device to access our server we need to add client in clients.conf file.

Code:
#vim /etc/freeradius/clients.conf

client 10.0.0.0/8 {

        secret = testingpassword
        shortname = testing
        nastype= mikrotik
}


clients.conf file


Code:
# -*- text -*-
##
## clients.conf -- client configuration directives
##
##    $Id$

#######################################################################
#
#  Define RADIUS clients (usually a NAS, Access Point, etc.).

#
#  Defines a RADIUS client.
#
#  '127.0.0.1' is another name for 'localhost'.  It is enabled by default,
#  to allow testing of the server after an initial installation.  If you
#  are not going to be permitting RADIUS queries from localhost, we suggest
#  that you delete, or comment out, this entry.
#
#

#
#  Each client has a "short name" that is used to distinguish it from
#  other clients.
#
#  In version 1.x, the string after the word "client" was the IP
#  address of the client.  In 2.0, the IP address is configured via
#  the "ipaddr" or "ipv6addr" fields.  For compatibility, the 1.x
#  format is still accepted.
#
client localhost {
    #  Allowed values are:
    #    dotted quad (1.2.3.4)
    #       hostname    (radius.example.com)
    ipaddr = 127.0.0.1

    #  OR, you can use an IPv6 address, but not both
    #  at the same time.
#    ipv6addr = ::    # any.  ::1 == localhost

    #
    #  A note on DNS:  We STRONGLY recommend using IP addresses
    #  rather than host names.  Using host names means that the
    #  server will do DNS lookups when it starts, making it
    #  dependent on DNS.  i.e. If anything goes wrong with DNS,
    #  the server won't start!
    #
    #  The server also looks up the IP address from DNS once, and
    #  only once, when it starts.  If the DNS record is later
    #  updated, the server WILL NOT see that update.
    #

    #  One client definition can be applied to an entire network.
    #  e.g. 127/8 should be defined with "ipaddr = 127.0.0.0" and
    #  "netmask = 8"
    #
    #  If not specified, the default netmask is 32 (i.e. /32)
    #
    #  We do NOT recommend using anything other than 32.  There
    #  are usually other, better ways to achieve the same goal.
    #  Using netmasks of other than 32 can cause security issues.
    #
    #  You can specify overlapping networks (127/8 and 127.0/16)
    #  In that case, the smallest possible network will be used
    #  as the "best match" for the client.
    #
    #  Clients can also be defined dynamically at run time, based
    #  on any criteria.  e.g. SQL lookups, keying off of NAS-Identifier,
    #  etc.
    #  See raddb/sites-available/dynamic-clients for details.
    #

#    netmask = 32

    #
    #  The shared secret use to "encrypt" and "sign" packets between
    #  the NAS and FreeRADIUS.  You MUST change this secret from the
    #  default, otherwise it's not a secret any more!
    #
    #  The secret can be any string, up to 8k characters in length.
    #
    #  Control codes can be entered vi octal encoding,
    #    e.g. "\101\102" == "AB"
    #  Quotation marks can be entered by escaping them,
    #    e.g. "foo\"bar"
    #
    #  A note on security:  The security of the RADIUS protocol
    #  depends COMPLETELY on this secret!  We recommend using a
    #  shared secret that is composed of:
    #
    #    upper case letters
    #    lower case letters
    #    numbers
    #
    #  And is at LEAST 8 characters long, preferably 16 characters in
    #  length.  The secret MUST be random, and should not be words,
    #  phrase, or anything else that is recognizable.
    #
    #  The default secret below is only for testing, and should
    #  not be used in any real environment.
    #
    secret        = server13

    #
    #  Old-style clients do not send a Message-Authenticator
    #  in an Access-Request.  RFC 5080 suggests that all clients
    #  SHOULD include it in an Access-Request.  The configuration
    #  item below allows the server to require it.  If a client
    #  is required to include a Message-Authenticator and it does
    #  not, then the packet will be silently discarded.
    #
    #  allowed values: yes, no
    require_message_authenticator = no

    #
    #  The short name is used as an alias for the fully qualified
    #  domain name, or the IP address.
    #
    #  It is accepted for compatibility with 1.x, but it is no
    #  longer necessary in 2.0
    #
#    shortname    = testing

    #
    # the following three fields are optional, but may be used by
    # checkrad.pl for simultaneous use checks
    #

    #
    # The nastype tells 'checkrad.pl' which NAS-specific method to
    #  use to query the NAS for simultaneous use.
    #
    #  Permitted NAS types are:
    #
    #    cisco
    #    computone
    #    livingston
    #    max40xx
    #    multitech
    #    netserver
    #    pathras
    #    patton
    #    portslave
    #    tc
    #    usrhiper
    #    other        # for all other types

    #
    nastype     = other    # localhost isn't usually a NAS...

    #
    #  The following two configurations are for future use.
    #  The 'naspasswd' file is currently used to store the NAS
    #  login name and password, which is used by checkrad.pl
    #  when querying the NAS for simultaneous use.
    #
#    login       = !root
#    password    = someadminpas

    #
    #  As of 2.0, clients can also be tied to a virtual server.
    #  This is done by setting the "virtual_server" configuration
    #  item, as in the example below.
    #
#    virtual_server = home1

    #
    #  A pointer to the "home_server_pool" OR a "home_server"
    #  section that contains the CoA configuration for this
    #  client.  For an example of a coa home server or pool,
    #  see raddb/sites-available/originate-coa
#    coa_server = coa
}

# IPv6 Client
#client ::1 {
#    secret        = testing123
#    shortname    = localhost
#}
#
# All IPv6 Site-local clients
#client fe80::/16 {
#    secret        = testing123
#    shortname    = localhost
#}

#client some.host.org {
#    secret        = testing123
#    shortname    = localhost
#}

#
#  You can now specify one secret for a network of clients.
#  When a client request comes in, the BEST match is chosen.
#  i.e. The entry from the smallest possible network.
#
#client 192.168.0.0/24 {
#    secret        = testing123-1
#    shortname    = private-network-1
#}
#
#client 192.168.0.0/16 {
#    secret        = testing123-2
#    shortname    = private-network-2
#}


#client 10.10.10.10 {
#    # secret and password are mapped through the "secrets" file.
#    secret      = server13
#    shortname   = testing
#       # the following three fields are optional, but may be used by
#       # checkrad.pl for simultaneous usage checks
#    nastype     = mikrotik
#    login       = !root
#    password    = someadminpas
#}

#######################################################################
#
#  Per-socket client lists.  The configuration entries are exactly
#  the same as above, but they are nested inside of a section.
#
#  You can have as many per-socket client lists as you have "listen"
#  sections, or you can re-use a list among multiple "listen" sections.
#
#  Un-comment this section, and edit a "listen" section to add:
#  "clients = per_socket_clients".  That IP address/port combination
#  will then accept ONLY the clients listed in this section.
#
#clients per_socket_clients {
#    client 192.168.3.4 {
#        secret = testing123
#        }
#}


molim za pomoc, dokumentaciju, tutor i slicno..


[ Nickix9001 @ 03.10.2013. 22:29 ] @
Daloradius

Evo ti linka.

Najvažnije ti je da uključiš sql.conf u radiusd.conf (STEP 3 tutorijala) i da podesiš readclients = yes. Zatim u daloradius-u ideš na management-NAS-New NAS. Tu ubacis ip adresu mikrotika i secret. To je to. Ako imas još neki problem samo se javi...
[ bmarkovic06 @ 04.10.2013. 00:50 ] @
Citat:

Najvažnije ti je da uključiš sql.conf u radiusd.conf (STEP 3 tutorijala) i da podesiš readclients = yes. Zatim u daloradius-u ideš na management-NAS-New NAS. Tu ubacis ip adresu mikrotika i secret. To je to. Ako imas još neki problem samo se javi...


I naravno posle dodavanja novog NAS-a mora:
#service freeradius restart

inace novo dodati NAS se nece autentifikovati.
[ dragansar @ 04.10.2013. 07:30 ] @
Pod predpostavkom da si podesio osnovno u daloradius.conf.php i sql.conf...
-Dali ti freeradius radi sa mysql-om? jesi ti skinuti komentari sa #sql na accounting{}; session{}; post-auth{}

Citat:
/etc/freeradius/sites-available/default

Skinut komentar sa?
#$INCLUDE sql.conf

-Dali ti je u "dictionary" dodati od mikrotika?
http://www.mikrotik.com/Docume...manual_2.9/dictionary.mikrotik

-Dali su ti isti ukljuceni?
Citat:
/etc/freeradius/dictionary

$INCLUDE /usr/share/freeradius/dictionary.mikrotik

Ne pada mi vise nista na pamet...ako jos imas nekih gresaka prati log i vidi sta se desava...


[ Nickix9001 @ 04.10.2013. 10:09 ] @
Citat:
bmarkovic06: I naravno posle dodavanja novog NAS-a mora:
#service freeradius restart

inace novo dodati NAS se nece autentifikovati.


Da, potrebno je restart da bi ukljucio sql. Posle dodavanja novih NAS-ova nije potreban restart...bar ne kod mene...
[ bmarkovic06 @ 04.10.2013. 10:14 ] @
Ja moram, inace auth ne prolazi.

Evo sredio sam malo kako treba podici free radius sa daloradiusom na ubuntu ili debian linuxu.


Ja koristim na Debianu i to radi bez greske sve.


Code:
apt-get install freeradius freeradius-mysql apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql php-pear php5-gd php-db


# mysql -u root -p

Next create the database and grant all privileges to user radius


mysql> CREATE DATABASE radius;
mysql> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radius@123";   #radius@123 je sifra
mysql> flush privileges;
mysql> exit


Now we need to build the schema for radius database


On Debian/Ubuntu


# mysql -uradius -p radius < /etc/freeradius/sql/mysql/schema.sql


# vi /etc/freeradius/sql.conf

Enter your mysql database details you just created


# Connection info:
server = "localhost"
port = 3306
login = "radius"
password = "radius@123"
# Database table configuration for everything except Oracle
radius_db = "radius"
readclients = yes  (da bi uspelo dodavanje NAS-ova iz managera daloradiusa)

Then we edit /etc/freeradius/radiusd.conf file

# vi /etc/freeradius/radiusd.conf 

  Uncomment Line 700 to include sql.conf


$INCLUDE sql.conf


Then edit the /etc/freeradius/sites-enabled/default file

# vi /etc/freeradius/sites-enabled/default 

     Uncomment sql on authorize{}
    # See “Authorization Queries” in sql.conf
    sql

    Uncomment sql on accounting{}
    # See “Accounting queries” in sql.conf
    sql

    Uncomment sql on session{}
    # See “Simultaneous Use Checking Queries” in sql.conf
    sql

    Uncomment sql on post-auth{}
    # See “Authentication Logging Queries” in sql.conf
    sql 

Komentarisati sve file linije da se spreci users from file jedino sa sql-a da kupi usere


Now edit

# vi /etc/freeradius/sites-available/inner-tunnel

On Debian, Ubuntu,  and uncomment the line 131 and line 255 containing ‘sql’ under authorize {} and under session {}.


Open UP
# vi /etc/freeradius/clients.conf

ako zelimo rucno da dodamo NAS

Posle svakog dodavanja NAS-a mora    #service freeradius restart


skinuti daloradius sa 

wget https://dl.dropboxusercontent....683019/daloradius-0.9-9.tar.gz

raspakovati ga sa #tar zxvf daloradius-0.9-9.tar.gz

preimenovati u daloradius sa:
#mv daloradius-0.9-9 daloradius
i premesiti u /var/www sa komandom #mv daloradius /var/www

Takodje u mysql bazu dodati:

# mysql -uradius -p radius < /var/www/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql

Izmeniti #vi /var/www/daloradius/library/daloradius.conf.php

i dodati user/pass od mysql baze

• $configValues['DALORADIUS_VERSION'] = '0.9-9';
• $configValues['FREERADIUS_VERSION'] = '2';
• $configValues['CONFIG_DB_ENGINE'] = 'mysql';
• $configValues['CONFIG_DB_HOST'] = 'localhost';
• $configValues['CONFIG_DB_USER'] = 'radius';
• $configValues['CONFIG_DB_PASS'] = 'radius@123';
• $configValues['CONFIG_DB_NAME'] = 'radius';


[ dragansar @ 04.10.2013. 10:24 ] @
Meni je na ubuntu pravio glupe probleme...tipa da servis padne pa ga moram rucno podici i sl...na debian nikad nista...
[ Flareon @ 06.10.2013. 20:09 ] @
Code:
Database error
Error Message: DB Error: no such field
Debug info: INSERT INTO nas (id,nasname,shortname,type,ports,secret,server,community,description) values (0, '127.0.0.1', 'knet', 'mikrotik', '0', 'serverk', '', '', '') [nativecode=1054 ** Unknown column 'server' in 'field list']



sve ostalo je uredno podeseno, a ovo nikako ne mogu da rijesim. Nisam htio pisati, rekoh sam cu rijesiti problem, ali ne ide :/

ovaj error mi izbaci prilikom dodavanja NAS -a

[ Nickix9001 @ 06.10.2013. 23:28 ] @


jel si dodao u bazu fr2-mysql-daloradius-and-freeradius.sql?
tu ima sva polja koja su potrebna.

[ dragansar @ 07.10.2013. 07:26 ] @
Citat:
Flareon:
Code:
Database error
Error Message: DB Error: no such field
Debug info: INSERT INTO nas (id,nasname,shortname,type,ports,secret,server,community,description) values (0, '127.0.0.1', 'knet', 'mikrotik', '0', 'serverk', '', '', '') [nativecode=1054 ** Unknown column 'server' in 'field list']



sve ostalo je uredno podeseno, a ovo nikako ne mogu da rijesim. Nisam htio pisati, rekoh sam cu rijesiti problem, ali ne ide :/

ovaj error mi izbaci prilikom dodavanja NAS -a


Debug je strasna stvar :D
Vidis da nesto nije u redu sa bazom...ili je nemas uopste kreiranu...ili je imas ali je prazna (imas templejt baze koji moras da ubacis...sa vec kreiranim tabelama)...ili ti nisu parametri za bazu podeseni u config fajlovima...ili permisije nisu oke...pa provjeri ;)