RADIUS only works if I use localhost. I can't use its IP address.
Output of: radtest user password localhost 1812 testing123
:
Sending Access-Request of id 251 to 127.0.0.1 port 1812
User-Name = "user"
User-Password = "password"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=251, length=33
Reply-Message = "Hello, user"
But if I want to use its IP address
Output of radtest user password 192.168.2.218 1812 testing123
:
Sending Access-Request of id 28 to 192.168.2.218 port 1812
User-Name = "user"
User-Password = "password"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
Message-Authenticator = 0x00000000000000000000000000000000
Sending Access-Request of id 28 to 192.168.2.218 port 1812
User-Name = "user"
User-Password = "password"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
Message-Authenticator = 0x00000000000000000000000000000000
Sending Access-Request of id 28 to 192.168.2.218 port 1812
User-Name = "user"
User-Password = "password"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
Message-Authenticator = 0x00000000000000000000000000000000
radclient: no response from server for ID 28 socket 3
Output of sudo freeradius -X
:
Ignoring request to authentication address * port 1812 from unknown client 192.168.2.218 port 46554
Ready to process requests.
Ignoring request to authentication address * port 1812 from unknown client 192.168.2.218 port 46554
Ready to process requests.
The user entry in /etc/freeradius/users
:
"user" Cleartext-Password := "password"
Reply-Message = "Hello, %{User-Name}"
The entry in clients.conf
:
client 192.168.2.218 {
ipaddr = 192.168.2.218
secret = testing123
}