0

I installed freeradius on CentOS 6.6 and I have configured the files /etc/raddb/clients and /etc/raddb/users. I am trying to test the server by this command :

radtest Aicha passme 127.0.0.1 100 testing123

This is the result :

radclient:: Failed to find IP address for Host-002
radclient: Nothing to send.
[root@Host-002 ~]# 

This is my file /etc/hosts :

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

Declaration of the user Aicha in /etc/raddb/users:

"Aicha"     Cleartext-Password := "passme"
        Framed-IP-Address = 192.168.1.65,
        Reply-Message = "Hello, %{User-Name}"

How to fix that ? Thank you.

Somar
  • 236
  • 3
  • 4
  • 14

2 Answers2

2

radtest is trying to resolve the IP address of your host so it can use it for the value of NAS-IP-Address.

Add an entry for Host-002 in /etc/hosts, mapping it either to a loopback IP or the IP you want to use for NAS-IP-Address.

Arran Cudbard-Bell
  • 1,514
  • 1
  • 9
  • 18
0

asname If present, this will be resolved to an IP address and added to the request packet as the NAS-IP-Address attribute. If you don’t specify it, the local hostname of the system will be used.

radtest testing password 192.168.1.90 1 testing123 nasname "192.168.1.90"

  • please fix the formatting of your answer ... – Pierre.Vriens Dec 28 '17 at 09:39
  • It looks like something has been cut off from the beginning of your answer. As it looks like you're quoting from the `radtest(1)` man page, you might want to say so. Just a simple "From `radtest(1)`:" at the beginning of your answer would be nice. – telcoM Dec 28 '17 at 09:39