Re: problem with IP 127.0.0.1

2005-04-06 Thread Alan DeKok
Marek Bartnikowski <[EMAIL PROTECTED]> wrote:
> when I changed NAS-IP-Address to Client-IP-Address I still have the
> SAME problem. I see first valid IP addres and next 127.0.0.1

  Find out WHY that query is being used.  Run the server in debugging
mode, and READ the output.

  Looking at the postgres log is useless, because it doesn't tell you
what FreeRADIUS is doing.

  Alan DeKok.


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


Re: problem with IP 127.0.0.1

2005-04-06 Thread Marek Bartnikowski

: > SELECT id,UserName,Attribute,Value,op, ip FROM v_wifi_auth WHERE
: > Username = 'john'  and ip='127.0.0.1' ORDER BY id ;
: 
:   Yes.  The NAS-IP-Address is put into the RADIUS packet by the NAS,
: and it can have ANY value.
: 
: > I don't want 127.0.0.1 in my db queries.
: > where can I 'disable' asking for ip 127.0.0.1?
: 
:   You can't.  It's the value of NAS-IP-Address.  If you look at the
: debug log, you will see that the NAS is sending that value to the
: server.
: 
:   The solution is to NOT use NAS-IP-Address, but Client-IP-Address.
: It's the IP address that the packet came from, and it's generated by
: FreeRADIUS, so you know it's correct.

helo again.
when I changed NAS-IP-Address to Client-IP-Address I still have the
SAME problem. I see first valid IP addres and next 127.0.0.1
any sugestions?

thanks.

-- 
Marek Bartnikowski
"All mail clients suck. This one just sucks less."

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


Re: problem with IP 127.0.0.1

2005-04-06 Thread Alan DeKok
Marek Bartnikowski <[EMAIL PROTECTED]> wrote:
> and this is ok. user john, has cable modem which IP is 10.23.31.101.
> 
> BUT!
> 
> in next lines I see query like that:
> 
> SELECT id,UserName,Attribute,Value,op, ip FROM v_wifi_auth WHERE
> Username = 'john'  and ip='127.0.0.1' ORDER BY id ;

  Yes.  The NAS-IP-Address is put into the RADIUS packet by the NAS,
and it can have ANY value.

> I don't want 127.0.0.1 in my db queries.
> where can I 'disable' asking for ip 127.0.0.1?

  You can't.  It's the value of NAS-IP-Address.  If you look at the
debug log, you will see that the NAS is sending that value to the
server.

  The solution is to NOT use NAS-IP-Address, but Client-IP-Address.
It's the IP address that the packet came from, and it's generated by
FreeRADIUS, so you know it's correct.

  Alan DeKok.


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