Logging based on port request came in on
Hello, I have freeradius 1.1.2 set up to listen on both ports 1812/1813 and 1645/1646. This is simply to separate user and admin login. What I would like to do is to add logging based on the port. I could add %{NAS-Port-Type} to the Detail such as: detailfile = ${radacctdir}/%{NAS-Port-Type}/auth-detail-%Y%m%d The problem with doing this as it uses the string "Wireless-802.11" or "Virtual". I would instead like to use the port the request came in on (1812 or 1645) or even modify that string value. I tried to add the string %(request:Packet-Dst-Port) (from the dictionary.freeradius.internal) in the detailfile, but comes back blank. Am I misreading this in some way. I assume that internally freeradius knows what port the request came in on. Thanks. Walt
Walt Reynolds wrote:
Hello,
I have freeradius 1.1.2 set up to listen on both ports 1812/1813 and 1645/1646. This is simply to separate user and admin login. What I would like to do is to add logging based on the port. I could add %{NAS-Port-Type} to the Detail such as:
detailfile = ${radacctdir}/%{NAS-Port-Type}/auth-detail-%Y%m%d
The problem with doing this as it uses the string "Wireless-802.11" or "Virtual". I would instead like to use the port the request came in on
NAS-Port-Type is, as you've discovered, the port type of the session being authenticated/accounted
(1812 or 1645) or even modify that string value. I tried to add the string %(request:Packet-Dst-Port) (from the dictionary.freeradius.internal) in the detailfile, but comes back blank.
You'll need a sufficiently recent version of the server for that to work, and IIRC the "preprocess" module needs to be run (you should always run it)
Am I misreading this in some way. I assume that internally freeradius knows what port the request came in on.
What version are you running?
Dear all, I just do a fresh installation of FBSD 6.2 and FR 1.1.4 According to http://www.chillispot.org/forum/viewtopic.php?t=37... ---------- We still need to add a structure of database which FreeRadius is going to use. In folder /usr/src/freeradius-1.0.0-pre3/src/modules/rlm_sql/drivers/rlm_sql_mysql/ is a file db_mysql.db. Use this file to create all necessary tables. Type: cd /src/freeradius-1.0.0-pre3/src/modules/rlm_sql/drivers/rlm_sql_mysql/ mysql –u root –p < db_mysql.db ---------- means will be at /usr/ports/net/freebsd/work/freeradius-1.1.4/src/modules/rlm_sql/drivers/rlm_sql_mysql/ on my box.. but.. i cound not find db_mysql.db file The files in this directory are : # ls -l total 150 -rw-r--r-- 1 admin 100 198 Jul 30 2002 Makefile.in -rw-r--r-- 1 admin 100 401 Dec 9 2005 config.h.in -rwxr-xr-x 1 admin 100 130566 Jul 7 2006 configure -rw-r--r-- 1 admin 100 5634 Dec 9 2005 configure.in -rw-r--r-- 1 admin 100 11063 Dec 9 2005 sql_mysql.c nothing else... how and where to get the structure file ? TIA PD
PD wrote:
Dear all,
I just do a fresh installation of FBSD 6.2 and FR 1.1.4
According to http://www.chillispot.org/forum/viewtopic.php?t=37... ---------- We still need to add a structure of database which FreeRadius is going to use. In folder /usr/src/freeradius-1.0.0-pre3/src/modules/rlm_sql/drivers/rlm_sql_mysql/ is a file db_mysql.db. Use this file to create all necessary tables. Type: cd /src/freeradius-1.0.0-pre3/src/modules/rlm_sql/drivers/rlm_sql_mysql/ mysql –u root –p < db_mysql.db ---------- means will be at /usr/ports/net/freebsd/work/freeradius-1.1.4/src/modules/rlm_sql/drivers/rlm_sql_mysql/ on my box..
but.. i cound not find db_mysql.db file
The files in this directory are : # ls -l total 150 -rw-r--r-- 1 admin 100 198 Jul 30 2002 Makefile.in -rw-r--r-- 1 admin 100 401 Dec 9 2005 config.h.in -rwxr-xr-x 1 admin 100 130566 Jul 7 2006 configure -rw-r--r-- 1 admin 100 5634 Dec 9 2005 configure.in -rw-r--r-- 1 admin 100 11063 Dec 9 2005 sql_mysql.c
nothing else...
how and where to get the structure file ?
Try looking in /usr/local/share/doc/freeradius/examples/ docs for freeradius are in /usr/local/share/doc/freeradius/ Cheers cya Andrew
TIA
PD
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Network Administrator / Manager Webzone Internet 1st Floor (Oakley Street Entrance) 167 Grote Street Adelaide SA, 5000 Phone 1300 303 932 Fax 08 8221 6204 Email andrewd@webzone.net.au manager@webzone.net.au
On 3/1/2007, "Andrew D" <andrewd@webzone.net.au> wrote:
how and where to get the structure file ?
Try looking in /usr/local/share/doc/freeradius/examples/ docs for freeradius are in /usr/local/share/doc/freeradius/
Thx Andrew.. I found it at /usr/local/share/doc/freeradius/examples/ Next questions... at /usr/local/etc/raddb we has clients.conf that contain nas ip address, secret, shortname and type. but at radius database we also has nas table Should both of them contain the same datas ? Why should we has both of them, not one only ? TIA Paul
Hi,
Thx Andrew.. I found it at /usr/local/share/doc/freeradius/examples/
yes. you were reading documentation out of sync with your version.
Next questions... at /usr/local/etc/raddb we has clients.conf that contain nas ip address, secret, shortname and type. but at radius database we also has nas table
Should both of them contain the same datas ? Why should we has both of them, not one only ?
you shouldnt use both - that just creates confusion. if you want to use the NAS table, use that. if you want to use clients.conf use that. BUT if you use the NAS table you must have a dummy entry in clients.conf alan
participants (5)
-
A.L.M.Buxey@lboro.ac.uk -
Andrew D -
PD -
Phil Mayers -
Walt Reynolds