RE: Newslists

2008-02-10 Thread Keith Dovale - HostworX.co.za
= monthly
Reply-Message = You have reached your Unshaped bandwidth cap
for this Month 

query = "SELECT IF(((SELECT (sum(AcctInputOctets) +
SUM(AcctOutputOctets))/1024)- (Select Value from radcheck where
UserName='%{%k}' and Attribute = 'Max-Prepaid-Limit') from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NU' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),((SELECT (sum(AcctInputOctets) +
SUM(AcctOutputOctets))/1024)- (Select Value from radcheck where
UserName='%{%k}' and Attribute = 'Max-Prepaid-Limit') from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NU' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),0)"
}

sqlcounter MonthlyShaped {
counter-name = Monthly-Traffic-Shaped
check-name = Max-Monthly-Blended-Shaped
reply-name = Session-Timeout
sqlmod-inst = sql
key = User-Name
reset = monthly
Reply-Message = You have reached your SHaped bandwidth cap
for this Month 
query = "SELECT IF(((SELECT (sum(AcctInputOctets) +
SUM(AcctOutputOctets))/1024)- (Select Value from radcheck where
UserName='%{%k}' and Attribute = 'Max-Prepaid-Limit') from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NS' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),((SELECT (sum(AcctInputOctets) +
SUM(AcctOutputOctets))/1024)- (Select Value from radcheck where
UserName='%{%k}' and Attribute = 'Max-Prepaid-Limit') from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NS' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),0)"
}

sqlcounter MonthlyLocal {
counter-name = Monthly-Traffic-Local
check-name = Max-Monthly-Local
reply-name = Session-Timeout
sqlmod-inst = sql
key = User-Name
reset = monthly
Reply-Message = You have reached your Local bandwidth cap
for this Month 
query = "SELECT IF(((SELECT (sum(AcctInputOctets) +
SUM(AcctOutputOctets))/1024)- (Select Value from radcheck where
UserName='%{%k}' and Attribute = 'Max-Prepaid-Limit') from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NL' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),SELECT ((SUM(AcctInputOctets) +
SUM(AcctOutputOctets))/1024)- (Select Value from radcheck where
UserName='%{%k}' and Attribute = 'Max-Prepaid-Limit') from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NL' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),0)"

}


always fail {
rcode = fail
}

always reject { 
rcode = reject
}

always ok {
rcode = ok
simulcount = 0
mpp = no
}

expr {
}

digest {
}

exec {
wait = yes
input_pairs = request
}
exec echo {
wait = yes
program = "/bin/echo %{User-Name}"
input_pairs = request
output_pairs = reply
}

exec POD {
wait = yes
program = "../../perl/bin/perl.exe
${confdir}/DisconChkAlt.pl %{User-Name} %{Framed-IP-Address}
%{NAS-IP-Address} %{X-Ascend-Session-Svr-Key}"
input_pairs = request
output_pairs = reply
#   packet_type = Accounting-Request
}
}

instantiate {
exec
expr
MonthlyUnShaped
MonthlyShaped   
MonthlyLocal
}

authorize {
auth_log
#   digest
hxdsl
sql
group {

reply_logUn 
AttrRewrite_MonthlyBlendedUnshaped 
reply_logUnFin
MonthlyUnShaped {
reject = 1  
ok = return 
}

reply_logSh
AttrRewrite_MonthlyBlendedShaped 
reply_logShFin
MonthlyShaped {
reject = 1 
ok = return  

}   

reply_logLoc
AttrRewrite_MonthlyLocal
reply_logLocFin
MonthlyLocal {
reject = 1  
ok = return  
}
    AttrRewrite_Limited 
}
reply_logEnd
pap
}


authenticate {
Aut

RE: Newslists

2008-02-10 Thread Keith Dovale - HostworX.co.za
Hi,

Yes this is why I started looking at the debugs to see what was happening
and found the attribute rewrite issue where it says it cannot find the
configuration token, if I take the Configuration token out of the radgroup
reply it shows one, if I take the attrib-rewrites out it only shows one in
the access accept packet.

So it looks like the Attrib rewrite is actually adding a second attrib
rather than editing the original one, and thus the errors in the debug log.

Does the radius give the resultant reply to attrib rewrite to check before
sending it out, is there a way to programmatically display the reply
attributes somehow, so I can see what the reply packet looks like before the
attrib rewrite edits it, by maybe logging to a file or something


Regards

Keith Dovale




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of [EMAIL PROTECTED]
Sent: Saturday, February 09, 2008 11:33 PM
To: FreeRadius users mailing list
Subject: Re: Newslists

Hi,

> Ok but then 
> 
> The thing about the attr_rewrite module is that it looks at ALL attributes
> in the list.  In this case, you have two Configuration-Tokens.  One has
> value "SHAPED_NORMAL", and the other "UNSHAPED_NORMAL".  It doesn't match
> the first, but it does match the second.  After that, it says it couldn't
> find any more.
> 
> Where does it get the second Configuration-Token from ?

well, from your debug I see this:

Sending Access-Accept of id 195 to 196.43.1.92 port 1820
Framed-Protocol := PPP
Configuration-Token := "SHAPED_NORMAL"
Session-Timeout := 86340
Acct-Interim-Interval := 3600
Configuration-Token = "SHAPED_NORMAL"
Reply-Message = "Your maximum monthly usage time has been reached"
Proxy-State = 0x313030

there are 2 "Configuration-Token" attributes.  possibly because
it was added in an incorrect way, or adjusted/set incorrectly originally?

alan
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Newslists

2008-02-09 Thread Keith Dovale - HostworX.co.za
Ok but then 

The thing about the attr_rewrite module is that it looks at ALL attributes
in the list.  In this case, you have two Configuration-Tokens.  One has
value "SHAPED_NORMAL", and the other "UNSHAPED_NORMAL".  It doesn't match
the first, but it does match the second.  After that, it says it couldn't
find any more.

Where does it get the second Configuration-Token from ?


Regards

Keith Dovale




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Alan DeKok
Sent: Saturday, February 09, 2008 6:17 PM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> A user logs in with shaped access, the group reply sets Configuration
token
> to SHAPED_NORMAL ok nowhere else is the Configuration-Token setup.
>
> The attrib-rewrite for unshaped kicks in and should check to see if the
> Configuration-token is UNSHAPED_LOCAL and if it can't find it rewrite it
to
> SHAPED_LOCAL is that not right.

  Yes.

> Then if the sqlcounter fails move into the next attrib-rewrite.
> 
> But in the debug it is looking for SHAPED_NORMAL in the UNSHAPED attrib
> rewrite.

  No.  As I said, that debug message is wrong.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Newslists

2008-02-09 Thread Keith Dovale - HostworX.co.za
Alan,

I appreciate you coming back to me, I apologise for my inappropriate
comments yesterday, I am as frustrated to hell. I should have asked what was
required first.

Ok  what confuses me is,

A user logs in with shaped access, the group reply sets Configuration token
to SHAPED_NORMAL ok nowhere else is the Configuration-Token setup.

The attrib-rewrite for unshaped kicks in and should check to see if the
Configuration-token is UNSHAPED_LOCAL and if it can't find it rewrite it to
SHAPED_LOCAL is that not right.

Then if the sqlcounter fails move into the next attrib-rewrite.

But in the debug it is looking for SHAPED_NORMAL in the UNSHAPED attrib
rewrite.

Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: No match found for
> attribute Configuration-Token with value 'SHAPED_NORMAL'

You say it looks at all the attributes where does is see I have
SHAPED_NORMAL and UNSHAPED_NORMAL set ? This confuses me a little, surely
when the rewrite does its job it overwrites the existing attribute values or
does it just add another ?



Regards

Keith Dovale




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Alan DeKok
Sent: Saturday, February 09, 2008 9:43 AM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> Ok you asked for the debug log here it is.

  The extra '-x' (which prints the time) is unnecessary, and makes it
harder to read the output.  Still..

> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: attribute =
> "Configuration-Token"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: searchfor =
> "UNSHAPED_NORMAL"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: searchin = "reply"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: replacewith =
> "SHAPED_NORMAL"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: append = no
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: ignore_case = yes
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: new_attribute = no
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: max_matches = 1
> Fri Feb  8 17:24:47 2008 : Debug: Module: Instantiated attr_rewrite
> (AttrRewrite_MonthlyBlendedShaped) 

  One instance of attr_rewrite...

> Fri Feb  8 17:27:26 2008 : Debug:   modsingle[authorize]: calling
> AttrRewrite_MonthlyBlendedShaped (rlm_attr_rewrite) for request 3
> Fri Feb  8 17:27:26 2008 : Debug: radius_xlat:  'UNSHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: No match found for
> attribute Configuration-Token with value 'SHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: radius_xlat:  'UNSHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: radius_xlat:  'SHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: Changed value for
> attribute Configuration-Token from 'UNSHAPED_NORMAL' to 'SHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: Could not find value
> pair for attribute Configuration-Token
> Fri Feb  8 17:27:26 2008 : Debug:   modsingle[authorize]: returned from
> AttrRewrite_MonthlyBlendedShaped (rlm_attr_rewrite) for request 3

  The thing about the attr_rewrite module is that it looks at ALL
attributes in the list.  In this case, you have two
Configuration-Tokens.  One has value "SHAPED_NORMAL", and the other
"UNSHAPED_NORMAL".  It doesn't match the first, but it does match the
second.  After that, it says it couldn't find any more.

  There is a bug.  The first "no match found" line prints the value of
the attribute that didn't match, NOT the value it was looking for.
Carefully reading the debug output makes this clear:

  - it says "no match"
  - it says "changed value from UNSHAPED_NORMAL"
  - returns from module AttrRewrite_MonthlyBlendedShaped

  i.e. the FIRST line is wrong.  You were getting confused because you
have *other* attr_rewrite modules which re-write SHAPED_NORMAL.  So
reading the debug log here, it looked like it was trying to re-write
SHAPED_NORMAL.  But it wasn't, because it was NOT running the
AttrRewrite_MonthlyLocal module.

  The only issue I see is that one debug line is wrong, and therefore
confusing.

  Is there anything else?

  Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Newslists

2008-02-08 Thread Keith Dovale - HostworX.co.za
I posted this all before, I just trimmed the debug file down to where the error 
was...


The attrib rewrite section ...


attr_rewrite AttrRewrite_MonthlyBlendedUnshaped {
attribute = Configuration-Token
searchin = reply
searchfor = "LOCAL_LIMITED"
replacewith = "UNSHAPED_NORMAL"
ignore_case = yes
new_attribute = yes
max_matches = 1
append = no
}

attr_rewrite AttrRewrite_MonthlyBlendedShaped {
attribute = Configuration-Token
searchin = reply
searchfor = "UNSHAPED_NORMAL"
replacewith = "SHAPED_NORMAL"
ignore_case = yes
   new_attribute = no
max_matches = 1
append = no
  }
attr_rewrite AttrRewrite_MonthlyLocal {
attribute = Configuration-Token
searchin = reply
searchfor = "SHAPED_NORMAL"
replacewith = "LOCAL_NORMAL"
ignore_case = yes
new_attribute = no
max_matches = 1
append = no
  }

attr_rewrite AttrRewrite_Limited {
attribute = Configuration-Token
searchin = reply
searchfor = "LOCAL_NORMAL"
replacewith = "LOCAL_LIMITED"
ignore_case = yes
new_attribute = no
max_matches = 1
append = no
  } 



The authorize section

authorize {
auth_log
#   digest
hxdsl
sql
group {

AttrRewrite_MonthlyBlendedUnshaped 
MonthlyUnShaped {
reject = 1  
ok = return 
}

AttrRewrite_MonthlyBlendedShaped 
MonthlyShaped {
reject = 1 
ok = return  

}   

AttrRewrite_MonthlyLocal
MonthlyLocal {
reject = 1  
ok = return  
}
AttrRewrite_Limited 
}

pap
}




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, February 08, 2008 4:39 PM
To: FreeRadius users mailing list
Subject: Re: Newslists

Hi,

> But when it checks for the attribute in the reply packet, it says it can't 
> find it, but it still does the attrib-rewrite changes the values and then 
> moans it couldn’t find the value pair. This is obviously not normal in my 
> opinion, and thus I asked about a specific problem. I only attached the debug 
> portion as it is specific to the problem.

post the relevant part of your config file?  We arent seeing
the whole picture. when you take a car to the garage, the mechanic
hears your story AND sees the car.

alan
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

RE: Newslists

2008-02-08 Thread Keith Dovale - HostworX.co.za
Ok you asked for the debug log here it is.


Fri Feb  8 17:24:47 2008 : Info: Starting - reading configuration files ...
Fri Feb  8 17:24:47 2008 : Debug: reread_config:  reading radiusd.conf
Fri Feb  8 17:24:47 2008 : Debug: Config:   including file:
../etc/raddb/proxy.conf
Fri Feb  8 17:24:47 2008 : Debug: Config:   including file:
../etc/raddb/clients.conf
Fri Feb  8 17:24:47 2008 : Debug: Config:   including file:
../etc/raddb/snmp.conf
Fri Feb  8 17:24:47 2008 : Debug: Config:   including file:
../etc/raddb/sql.conf
Fri Feb  8 17:24:47 2008 : Debug:  main: prefix = ".."
Fri Feb  8 17:24:47 2008 : Debug:  main: localstatedir = "../var"
Fri Feb  8 17:24:47 2008 : Debug:  main: logdir = "../var/log/radius"
Fri Feb  8 17:24:47 2008 : Debug:  main: libdir = "../lib"
Fri Feb  8 17:24:47 2008 : Debug:  main: radacctdir =
"../var/log/radius/radacct"
Fri Feb  8 17:24:47 2008 : Debug:  main: hostname_lookups = no
Fri Feb  8 17:24:47 2008 : Debug:  main: max_request_time = 60
Fri Feb  8 17:24:47 2008 : Debug:  main: cleanup_delay = 6
Fri Feb  8 17:24:47 2008 : Debug:  main: max_requests = 25600
Fri Feb  8 17:24:47 2008 : Debug:  main: delete_blocked_requests = 0
Fri Feb  8 17:24:47 2008 : Debug:  main: port = 0
Fri Feb  8 17:24:47 2008 : Debug:  main: allow_core_dumps = no
Fri Feb  8 17:24:47 2008 : Debug:  main: log_stripped_names = no
Fri Feb  8 17:24:47 2008 : Debug:  main: log_file =
"../var/log/radius/radius.log"
Fri Feb  8 17:24:47 2008 : Debug:  main: log_auth = yes
Fri Feb  8 17:24:47 2008 : Debug:  main: log_auth_badpass = yes
Fri Feb  8 17:24:47 2008 : Debug:  main: log_auth_goodpass = yes
Fri Feb  8 17:24:47 2008 : Debug:  main: pidfile =
"../var/run/radiusd/radiusd.pid"
Fri Feb  8 17:24:47 2008 : Debug:  main: bind_address = xx.xx.xx.xx IP
address [xx.xx.xx.xx]
Fri Feb  8 17:24:47 2008 : Debug:  main: user = "(null)"
Fri Feb  8 17:24:47 2008 : Debug:  main: group = "(null)"
Fri Feb  8 17:24:47 2008 : Debug:  main: usercollide = no
Fri Feb  8 17:24:47 2008 : Debug:  main: lower_user = "after"
Fri Feb  8 17:24:47 2008 : Debug:  main: lower_pass = "no"
Fri Feb  8 17:24:47 2008 : Debug:  main: nospace_user = "after"
Fri Feb  8 17:24:47 2008 : Debug:  main: nospace_pass = "before"
Fri Feb  8 17:24:47 2008 : Debug:  main: checkrad = "../sbin/checkrad"
Fri Feb  8 17:24:47 2008 : Debug:  main: proxy_requests = yes
Fri Feb  8 17:24:47 2008 : Debug:  proxy: retry_delay = 5
Fri Feb  8 17:24:47 2008 : Debug:  proxy: retry_count = 3
Fri Feb  8 17:24:47 2008 : Debug:  proxy: synchronous = no
Fri Feb  8 17:24:47 2008 : Debug:  proxy: default_fallback = yes
Fri Feb  8 17:24:47 2008 : Debug:  proxy: dead_time = 120
Fri Feb  8 17:24:47 2008 : Debug:  proxy: post_proxy_authorize = no
Fri Feb  8 17:24:47 2008 : Debug:  proxy: wake_all_if_all_dead = no
Fri Feb  8 17:24:47 2008 : Debug:  security: max_attributes = 200
Fri Feb  8 17:24:47 2008 : Debug:  security: reject_delay = 1
Fri Feb  8 17:24:47 2008 : Debug:  security: status_server = no
Fri Feb  8 17:24:47 2008 : Debug:  main: debug_level = 0
Fri Feb  8 17:24:47 2008 : Debug: read_config_files:  reading dictionary
Fri Feb  8 17:24:47 2008 : Debug: read_config_files:  reading naslist
Fri Feb  8 17:24:47 2008 : Info: Using deprecated naslist file.  Support for
this will go away soon.
Fri Feb  8 17:24:47 2008 : Debug: read_config_files:  reading clients
Fri Feb  8 17:24:47 2008 : Debug: read_config_files:  reading realms
Fri Feb  8 17:24:47 2008 : Debug: radiusd:  entering modules setup
Fri Feb  8 17:24:47 2008 : Debug: Module: Library search path is ../lib
Fri Feb  8 17:24:47 2008 : Debug: Module: Loaded exec 
Fri Feb  8 17:24:47 2008 : Debug:  exec: wait = yes
Fri Feb  8 17:24:47 2008 : Debug:  exec: program = "(null)"
Fri Feb  8 17:24:47 2008 : Debug:  exec: input_pairs = "request"
Fri Feb  8 17:24:47 2008 : Debug:  exec: output_pairs = "(null)"
Fri Feb  8 17:24:47 2008 : Debug:  exec: packet_type = "(null)"
Fri Feb  8 17:24:47 2008 : Info: rlm_exec: Wait=yes but no output defined.
Did you mean output=none?
Fri Feb  8 17:24:47 2008 : Debug: Module: Instantiated exec (exec) 
Fri Feb  8 17:24:47 2008 : Debug: Module: Loaded expr 
Fri Feb  8 17:24:47 2008 : Debug: Module: Instantiated expr (expr) 
Fri Feb  8 17:24:47 2008 : Debug: Module: Loaded SQL Counter 
Fri Feb  8 17:24:47 2008 : Debug:  sqlcounter: counter-name =
"Monthly-Traffic-UnShaped"
Fri Feb  8 17:24:47 2008 : Debug:  sqlcounter: check-name =
"Max-Monthly-Blended-UnShaped"
Fri Feb  8 17:24:47 2008 : Debug:  sqlcounter: reply-name =
"Session-Timeout"
Fri Feb  8 17:24:47 2008 : Debug:  sqlcounter: key = "User-Name"
Fri Feb  8 17:24:47 2008 : Debug:  sqlcounter: sqlmod-inst = "sql"
Fri Feb  8 17:24:47 2008 : Debug:  sqlcounter: query = "SELECT IF((SELECT
(sum(AcctInputOctets) + SUM(AcctOutputOctets))/1024 from radacct WHERE
UserName='%{%k}' AND Class REGEXP '^NU' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'),(SELECT (sum(AcctInputOctets) +
SUM(AcctOutputOctets))/1024 from radacct WHERE UserName='%

RE: Newslists

2008-02-08 Thread Keith Dovale - HostworX.co.za
Dear GOD, 

I am quite prepared to pay someone to resolve my problems if necessary, however 
the point of this news list is supposed to be people helping people, learn from 
others who have been there etc, and not being a bill gates society. 

All I can say is, if you spent as much time helping people as you did coming up 
with crap comments the world would be a better place. I have been subscribed to 
this news list for a short while now, and you of all people continually give 
people sarcastic comments.. Get a Life... 

You have spent more time giving me crap comments, than one decent one saying 
exactly what you would expect or need to look at this issue to resolve it. You 
constantly have some crap comment to make, Like I said before I will find out 
from another source. 

Instead of coming out with what you require you make these little noises about 
how pathetic the poster is and shirk them off. You obviously have SDS...






-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan DeKok
Sent: Friday, February 08, 2008 4:07 PM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> what more can a person say about the attrib rewrite, other than the attribute 
> rewrite is supposed to check for an attribute in a packet in this case the 
> reply packet, if it finds the attribute,  change it and basically carry on

  While that is possible, it's not evident from the debug log you posted.

> But when it checks for the attribute in the reply packet, it says it can't 
> find it, but it still does the attrib-rewrite changes the values and then 
> moans it couldn’t find the value pair. This is obviously not normal in my 
> opinion, and thus I asked about a specific problem. I only attached the debug 
> portion as it is specific to the problem.

  See my previous response.

> When you take your car to the garage for a brake problem, you don’t explain 
> how the engine, fan, wheels, boot opener works,  you say the car does not 
> stop when I push the breaks. If the mechanic asks for more info then you tell 
> him.

  Mechanics are used to people claiming all sorts of interesting
problems with there cars that are unrelated to what is *really* broken.

  C: My car won't start! The starter motor is broken!
  M: Is there gas in the car?
  C: Err... no.
  M: Right then... here's the bill.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

RE: Newslists

2008-02-08 Thread Keith Dovale - HostworX.co.za
I did explain what I was trying to do with the failover and the attr_rewrite 
function, 

what more can a person say about the attrib rewrite, other than the attribute 
rewrite is supposed to check for an attribute in a packet in this case the 
reply packet, if it finds the attribute,  change it and basically carry on

But when it checks for the attribute in the reply packet, it says it can't find 
it, but it still does the attrib-rewrite changes the values and then moans it 
couldn’t find the value pair. This is obviously not normal in my opinion, and 
thus I asked about a specific problem. I only attached the debug portion as it 
is specific to the problem.

When you take your car to the garage for a brake problem, you don’t explain how 
the engine, fan, wheels, boot opener works,  you say the car does not stop when 
I push the breaks. If the mechanic asks for more info then you tell him.

rlm_attr_rewrite: No match found for attribute Configuration-Token with
> value 'SHAPED_NORMAL'
> 
> radius_xlat:  'UNSHAPED_NORMAL'
> 
> radius_xlat:  'SHAPED_NORMAL'
> 
> rlm_attr_rewrite: Changed value for attribute Configuration-Token from
> 'UNSHAPED_NORMAL' to 'SHAPED_NORMAL'
> 
> rlm_attr_rewrite: Could not find value pair for attribute
> Configuration-Token


Regards

Keith Dovale




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edvin Seferovic
Sent: Friday, February 08, 2008 12:14 PM
To: 'FreeRadius users mailing list'
Subject: RE: Newslists

Constructive answer like always is to analyze what you want to achieve with 
freeradius. Rethink the configuration, read the documentation for you setup 
needs and ask straight-forward question. You cannot just post the debug output 
and hope that someone can understand what you actually need.

Try to elaborate your setup, the steps you have already done and of course the 
debugging output. Alan will probably give you simple answer like yes/no and 
point to the right direction. But again - you cannot expect someone to do the 
installation and setup for you ! People are usually paid for that !

Although Alan might be sarcastic, he has never let anyone down who was willing 
to learn and accept the mistakes ( including myself ).

Regards,
E:S

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Dovale - 
HostworX.co.za
Sent: Freitag, 08. Februar 2008 10:46
To: 'FreeRadius users mailing list'
Subject: RE: Newslists

No not at all, and I don’t expect it. 

But at least someone like yourself, who seems to be the guru on freeradius, 
could at least reply with a constructive answer rather than replying with 
sarcastic comments.

My question is where did I announce I don’t read the documentation that is the 
first thing I went to.

I have gone through the read me's, faq's etc and have followed their directions 
regarding this, it’s the debug that is giving the error. And responding with 
weird checks, that is exactly why I posted here as there is no google results / 
faqs, etc that answer my question.


Regards

Keith



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan DeKok
Sent: Friday, February 08, 2008 9:44 AM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> My Honest opinion of this news list / user group is that it is not
> helpful at all, it seems if you are not in the click, no one helps, does
> anyone moderate this or not ? I have posted twice now and no one replies…

  Is there a contractual obligation requiring people to support you?

  In any case, you haven't followed the instructions in the FAQ, README,
INSTALL, etc.  You've already announced that you don't read the
documentation people write, so why would anyone write more on this list?

>  
> 
> Regards
> 
>  
> 
> Keith
> 
>  
> 
> *From:* Keith Dovale - HostworX.co.za [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, February 07, 2008 9:08 PM
> *To:*   '
> *Subject:* attr rewrite issue
> 
>  
> 
> Hi Guys, some help please .
> 
>  
> 
> I am trying to do a attr rewrite to change an Attribute value then do a
> check based on the attribute that is changed, if the check fails do
> another attrib rewrite to the next value and do another check, until
> either the check fails or passes. There is basically only 4 checks in
> the group statement in the authorise section which do
> 
>  
> 
> Attrib rewrite
> 
> Do check
> 
> (If it fails do)
> 
>  
> 
> Attrib rewrite
> 
> Do check
> 
> (If it fails do)
> 
>  
> 
> Attrib check
> 
> Do rewrite
> 
> (If it fails do)
> 
>  
> 
> Attrib check
> 
> Do rewrite
> 
>

RE: Newslists

2008-02-08 Thread Keith Dovale - HostworX.co.za
Alan, 

Thanks once again for your "realistic" comments (Sarcastic none the less).

I will find alternative support as this user list is totally none the less.. 
Regards

Keith Dovale




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan DeKok
Sent: Friday, February 08, 2008 11:52 AM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> No not at all, and I don’t expect it. 

  It sounds like you did... hence the complaint about no answer.

> But at least someone like yourself, who seems to be the guru on freeradius, 
> could at least reply

  So you did expect a reply...

> with a constructive answer rather than replying with sarcastic comments.

  Reality isn't sarcasm.

> My question is where did I announce I don’t read the documentation that is 
> the first thing I went to.
> 
> I have gone through the read me's, faq's etc and have followed their 
> directions regarding this, it’s the debug that is giving the error. And 
> responding with weird checks, that is exactly why I posted here as there is 
> no google results / faqs, etc that answer my question.

  You posted an edited piece of the debug log.  If you knew how to
configure it and read the debug log, it would be appropriate to edit the
debug log.  Since you don't know how to configure it, your edits very
likely removed all information that could be used to help you.

  Hence the comments about reality.  If you want people to help you,
make it easy for them to help you.  Making it hard to help you, and then
complaining about the lack of free support is ... unproductive.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

RE: Newslists

2008-02-08 Thread Keith Dovale - HostworX.co.za
No not at all, and I don’t expect it. 

But at least someone like yourself, who seems to be the guru on freeradius, 
could at least reply with a constructive answer rather than replying with 
sarcastic comments.

My question is where did I announce I don’t read the documentation that is the 
first thing I went to.

I have gone through the read me's, faq's etc and have followed their directions 
regarding this, it’s the debug that is giving the error. And responding with 
weird checks, that is exactly why I posted here as there is no google results / 
faqs, etc that answer my question.


Regards

Keith



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan DeKok
Sent: Friday, February 08, 2008 9:44 AM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> My Honest opinion of this news list / user group is that it is not
> helpful at all, it seems if you are not in the click, no one helps, does
> anyone moderate this or not ? I have posted twice now and no one replies…

  Is there a contractual obligation requiring people to support you?

  In any case, you haven't followed the instructions in the FAQ, README,
INSTALL, etc.  You've already announced that you don't read the
documentation people write, so why would anyone write more on this list?

>  
> 
> Regards
> 
>  
> 
> Keith
> 
>  
> 
> *From:* Keith Dovale - HostworX.co.za [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, February 07, 2008 9:08 PM
> *To:*   '
> *Subject:* attr rewrite issue
> 
>  
> 
> Hi Guys, some help please .
> 
>  
> 
> I am trying to do a attr rewrite to change an Attribute value then do a
> check based on the attribute that is changed, if the check fails do
> another attrib rewrite to the next value and do another check, until
> either the check fails or passes. There is basically only 4 checks in
> the group statement in the authorise section which do
> 
>  
> 
> Attrib rewrite
> 
> Do check
> 
> (If it fails do)
> 
>  
> 
> Attrib rewrite
> 
> Do check
> 
> (If it fails do)
> 
>  
> 
> Attrib check
> 
> Do rewrite
> 
> (If it fails do)
> 
>  
> 
> Attrib check
> 
> Do rewrite
> 
> Reject
> 
> Pass
> 
>  
> 
> When it runs it checks the reply packet for an attribute
> Configuration-Token which is defined in the radgroupreply for the users
> but it seems it cannot find it and gives an error. As below
> 
>
> 
> rlm_sqlcounter: (Check item - counter) is less than zero
> 
> rlm_sqlcounter: Rejected user keith, check_item=0, counter=0
> 
>   modcall[authorize]: module "MonthlyUnShaped" returns reject for request 2
> 
> radius_xlat:  'UNSHAPED_NORMAL'
> 
> rlm_attr_rewrite: No match found for attribute Configuration-Token with
> value 'SHAPED_NORMAL'
> 
> radius_xlat:  'UNSHAPED_NORMAL'
> 
> radius_xlat:  'SHAPED_NORMAL'
> 
> rlm_attr_rewrite: Changed value for attribute Configuration-Token from
> 'UNSHAPED_NORMAL' to 'SHAPED_NORMAL'
> 
> rlm_attr_rewrite: Could not find value pair for attribute
> Configuration-Token
> 
>   modcall[authorize]: module "AttrRewrite_MonthlyBlendedShaped" returns
> ok for request 2
> 
>  
> 
> can anyone help
> 
>  
> 
> 
> 
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Newslists

2008-02-07 Thread Keith Dovale - HostworX.co.za
My Honest opinion of this news list / user group is that it is not helpful
at all, it seems if you are not in the click, no one helps, does anyone
moderate this or not ? I have posted twice now and no one replies.

 

Regards

 

Keith

 

From: Keith Dovale - HostworX.co.za [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 07, 2008 9:08 PM
To:   '
Subject: attr rewrite issue

 

Hi Guys, some help please .

 

I am trying to do a attr rewrite to change an Attribute value then do a
check based on the attribute that is changed, if the check fails do another
attrib rewrite to the next value and do another check, until either the
check fails or passes. There is basically only 4 checks in the group
statement in the authorise section which do

 

Attrib rewrite

Do check

(If it fails do)

 

Attrib rewrite

Do check

(If it fails do)

 

Attrib check

Do rewrite

(If it fails do)

 

Attrib check

Do rewrite

Reject

Pass

 

When it runs it checks the reply packet for an attribute Configuration-Token
which is defined in the radgroupreply for the users but it seems it cannot
find it and gives an error. As below



rlm_sqlcounter: (Check item - counter) is less than zero

rlm_sqlcounter: Rejected user keith, check_item=0, counter=0

  modcall[authorize]: module "MonthlyUnShaped" returns reject for request 2

radius_xlat:  'UNSHAPED_NORMAL'

rlm_attr_rewrite: No match found for attribute Configuration-Token with
value 'SHAPED_NORMAL'

radius_xlat:  'UNSHAPED_NORMAL'

radius_xlat:  'SHAPED_NORMAL'

rlm_attr_rewrite: Changed value for attribute Configuration-Token from
'UNSHAPED_NORMAL' to 'SHAPED_NORMAL'

rlm_attr_rewrite: Could not find value pair for attribute
Configuration-Token

  modcall[authorize]: module "AttrRewrite_MonthlyBlendedShaped" returns ok
for request 2

 

can anyone help

 

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

attr rewrite issue

2008-02-07 Thread Keith Dovale - HostworX.co.za
Hi Guys, some help please .

 

I am trying to do a attr rewrite to change an Attribute value then do a
check based on the attribute that is changed, if the check fails do another
attrib rewrite to the next value and do another check, until either the
check fails or passes. There is basically only 4 checks in the group
statement in the authorise section which do

 

Attrib rewrite

Do check

(If it fails do)

 

Attrib rewrite

Do check

(If it fails do)

 

Attrib check

Do rewrite

(If it fails do)

 

Attrib check

Do rewrite

Reject

Pass

 

When it runs it checks the reply packet for an attribute Configuration-Token
which is defined in the radgroupreply for the users but it seems it cannot
find it and gives an error. As below



rlm_sqlcounter: (Check item - counter) is less than zero

rlm_sqlcounter: Rejected user keith, check_item=0, counter=0

  modcall[authorize]: module "MonthlyUnShaped" returns reject for request 2

radius_xlat:  'UNSHAPED_NORMAL'

rlm_attr_rewrite: No match found for attribute Configuration-Token with
value 'SHAPED_NORMAL'

radius_xlat:  'UNSHAPED_NORMAL'

radius_xlat:  'SHAPED_NORMAL'

rlm_attr_rewrite: Changed value for attribute Configuration-Token from
'UNSHAPED_NORMAL' to 'SHAPED_NORMAL'

rlm_attr_rewrite: Could not find value pair for attribute
Configuration-Token

  modcall[authorize]: module "AttrRewrite_MonthlyBlendedShaped" returns ok
for request 2

 

can anyone help

 

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Help Needed Please freeradius traffic limiting

2008-01-15 Thread Keith Dovale
FFs, Lol 

 

Hi List,

 

Ok I need to do this and if someone could help I would appreciate it as I am
new to this

 

1.   I Need to limit users by  traffic and NOT session time (I setup the
monthly counters to check but the counters cannot go beyond 2,148,000,000
and they fail I think this is due to the counters using the  type as
integer. If I can get this value to go beyond this this then sorts out my
problem based on traffic.)

2.   I need to execute a query to check the clients total traffic usage
and compare it to their limit, if they have gone beyond their limit I need
to be able to execute a disconnect. (The disconnect side I have got working
manually, so if there is a way to trigger / execute a program on a interim
update which will force a discon that will help, else if this can be done
another way please let me know.

3.   Any recommendations on how to go about the above issues which will
do this in an easier way please let me know.

 

 

Regards

 

Keith Dovale

 <http://www.hostworx.co.za/> LogoNBG

 

<>-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

RE: Possible Spam : Low Spam probability - : sqlcounter continue after failed match

2008-01-15 Thread Keith Dovale
Hi Etienne, are you also limiting your users based on traffic usage ?

Regards

Keith Dovale


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Etienne Pretorius
Sent: Tuesday, January 15, 2008 6:30 PM
To: FreeRadius users mailing list
Subject: Possible Spam : Low Spam probability - : sqlcounter continue after
failed match

Hello List,

I have managed to get sqlcounter working for tracking the octets in the 
accounting database. Could someone give me a hint as how I would say 
allow a user for group 'A' to use up their octets and if the user also 
belongs to group 'B' to then allow an addtional amount of octets (10%) 
for example.

I actually only need a Fall-Though like attribute for the authorize 
section as I have both queries working individually but when the user 
fails to pass sqlcounter on a group 'A' bases, then the Access-Reject 
packet is sent without FreeRadius attempting to process group 'B' 
sqlcounter.

Kind Regards
Etienne Pretorius


-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


FW: Help Needed Please freeradius traffic limiting

2008-01-15 Thread Keith Dovale
 

 

Regards

 

Keith Dovale

 <http://www.hostworx.co.za/>  

 

From: Keith Dovale 
Sent: Tuesday, January 15, 2008 6:24 PM
To: 'FreeRadius users mailing list'
Subject: Help Needed Please freeradius traffic limiting

 

Ok I need to do this and if someone could help I would appreciate it as I am
new to this

 

1.   I Need to limit users by  traffic and NOT session time (I setup the
monthly counters to check but the counters cannot go beyond 2,148,000,000
and they fail I think this is due to the counters using the  type as
integer. If I can get this value to go beyond this this then sorts out my
problem based on traffic.)

2.   I need to execute a query to check the clients total traffic usage
and compare it to their limit, if they have gone beyond their limit I need
to be able to execute a disconnect. (The disconnect side I have got working
manually, so if there is a way to trigger / execute a program on a interim
update which will force a discon that will help, else if this can be done
another way please let me know.

3.   Any recommendations on how to go about the above issues which will
do this in an easier way please let me know.

 

 

Regards

 

Keith Dovale

 <http://www.hostworx.co.za/> 

 

<>-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

RE: Possible Spam : Low Spam probability - : Re: SQL Counter Problem

2008-01-12 Thread Keith Dovale
Thanks alan, I have tested and it definitely seems to be a problem, the
field is using a varchar(255) in sql I thought this was an issue but it is
not. Is there any way you could rebuild the sqlcounters for freeradius.net ?
have a compiled version already.

I have seen some mention about the sqlcounter being compiled using a traffic
based option and not looking at the session time

Regards

Keith Dovale


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Alan DeKok
Sent: Friday, January 11, 2008 2:41 PM
To: FreeRadius users mailing list
Subject: Possible Spam : Low Spam probability - : Re: SQL Counter Problem

Keith Dovale wrote:
> Is there a limitation with the SQLCounter routine using a value above
> 2,148,000,000 in the
> checkfield ? As if I set this value to anything below this figure the
> routine works as planned however if I go above this value it rejects the
> user as no available time.

  The counters are 32 bits, so that is likely the source of the limitation.

> I am trying to use the sqlcounter to check to see if the user has
available
> bandwidth and if so give them access, but this now limits me to this
value.
> I am using the freeradius port for cygwin, can anyone help me out with
this
> as I need to set this figure to above 30Mb value

  30Mb should work.

  If you need 64-bit counters, the code will have to be modified.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


SQL Counter Problem

2008-01-11 Thread Keith Dovale
Is there a limitation with the SQLCounter routine using a value above
2,148,000,000 in the
checkfield ? As if I set this value to anything below this figure the
routine works as planned however if I go above this value it rejects the
user as no available time.

I am trying to use the sqlcounter to check to see if the user has available
bandwidth and if so give them access, but this now limits me to this value.
I am using the freeradius port for cygwin, can anyone help me out with this
as I need to set this figure to above 30Mb value



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html