Hello everyone, I am trying to accept all incoming requests using freeradius.db. SQL is connected to freeradius and working fine. I added an entry in radcheck table: DEFAULT | Auth-Type | := | Accept However, I cannot get Accept-Accept. When I add the entry in raddb/users: DEFAULT Auth-Type := Accept I get Accept-Accept from all users. What am I doing wrong in database? Thank you.
The response is: (4) Received Access-Request Id 164 from 192.168.67.229:55198 to 192.168.67.229:1812 length 74 (4) User-Name = "test" (4) User-Password = "hellasdo1" (4) NAS-IP-Address = 127.0.1.1 (4) NAS-Port = 10 (4) Message-Authenticator = 0xd2c28792e118fbc8db00f78bc58d33d4 (4) # Executing section authorize from file /opt/sinecins/bin/freeradius/etc/raddb/sites-enabled/default (4) authorize { (4) policy filter_username { (4) if (&User-Name) { (4) if (&User-Name) -> TRUE (4) if (&User-Name) { (4) if (&User-Name =~ / /) { (4) if (&User-Name =~ / /) -> FALSE (4) if (&User-Name =~ /@[^@]*@/ ) { (4) if (&User-Name =~ /@[^@]*@/ ) -> FALSE (4) if (&User-Name =~ /\.\./ ) { (4) if (&User-Name =~ /\.\./ ) -> FALSE (4) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) { (4) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE (4) if (&User-Name =~ /\.$/) { (4) if (&User-Name =~ /\.$/) -> FALSE (4) if (&User-Name =~ /@\./) { (4) if (&User-Name =~ /@\./) -> FALSE (4) } # if (&User-Name) = notfound (4) } # policy filter_username = notfound (4) [preprocess] = ok (4) [digest] = noop (4) suffix: Checking for suffix after "@" (4) suffix: No '@' in User-Name = "test", looking up realm NULL (4) suffix: No such realm "NULL" (4) [suffix] = noop (4) IPASS: Checking for prefix before "/" (4) IPASS: No '/' in User-Name = "test", looking up realm NULL (4) IPASS: No such realm "NULL" (4) [IPASS] = noop (4) ntdomain: Checking for prefix before "\" (4) ntdomain: No '\' in User-Name = "test", looking up realm NULL (4) ntdomain: No such realm "NULL" (4) [ntdomain] = noop (4) eap: No EAP-Message, not doing EAP (4) [eap] = noop (4) [files] = noop (4) sql: EXPAND %{User-Name} (4) sql: --> test (4) sql: SQL-User-Name set to 'test' rlm_sql (sql): Reserved connection (7) (4) sql: EXPAND SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id (4) sql: --> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'test' ORDER BY id (4) sql: Executing select query: SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'test' ORDER BY id rlm_sql (sql): Reserved connection (8) rlm_sql (sql): Released connection (8) Need 6 more connections to reach 10 spares rlm_sql (sql): Opening additional connection (12), 1 of 27 pending slots used rlm_sql_sqlite: Opening SQLite database "/opt/sinecins/bin/freeradius.db" (4) sql: EXPAND SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority (4) sql: --> SELECT groupname FROM radusergroup WHERE username = 'test' ORDER BY priority (4) sql: Executing select query: SELECT groupname FROM radusergroup WHERE username = 'test' ORDER BY priority (4) sql: User not found in any groups rlm_sql (sql): Released connection (7) (4) [sql] = notfound (4) [expiration] = noop (4) [logintime] = noop (4) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type (4) pap: WARNING: Authentication will fail unless a "known good" password is available (4) [pap] = noop (4) if (authcheck_table:User-Name == 'DEFAULT'){ (4) if (authcheck_table:User-Name == 'DEFAULT') -> FALSE (4) } # authorize = ok (4) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject (4) Failed to authenticate the user (4) Using Post-Auth-Type Reject (4) # Executing group from file /opt/sinecins/bin/freeradius/etc/raddb/sites-enabled/default (4) Post-Auth-Type REJECT { (4) sql: EXPAND .query (4) sql: --> .query (4) sql: Using query template 'query' rlm_sql (sql): Reserved connection (9) (4) sql: EXPAND %{User-Name} (4) sql: --> test (4) sql: SQL-User-Name set to 'test' (4) sql: EXPAND INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{SQL-User-Name}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S') (4) sql: --> INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 'test', 'hellasdo1', 'Access-Reject', '2020-04-27 19:06:58') (4) sql: Executing query: INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 'test', 'hellasdo1', 'Access-Reject', '2020-04-27 19:06:58') (4) sql: SQL query returned: success (4) sql: 1 record(s) updated rlm_sql (sql): Released connection (9) (4) [sql] = ok (4) attr_filter.access_reject: EXPAND %{User-Name} (4) attr_filter.access_reject: --> test (4) attr_filter.access_reject: Matched entry DEFAULT at line 11 (4) [attr_filter.access_reject] = updated (4) [eap] = noop (4) policy remove_reply_message_if_eap { (4) if (&reply:EAP-Message && &reply:Reply-Message) { (4) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE (4) else { (4) [noop] = noop (4) } # else = noop (4) } # policy remove_reply_message_if_eap = noop (4) } # Post-Auth-Type REJECT = updated (4) Login incorrect (No Auth-Type found: rejecting the user via Post-Auth-Type = Reject): [test] (from client client1 port 10) (4) Delaying response for 1.000000 seconds Waking up in 0.3 seconds. Waking up in 0.6 seconds. (4) Sending delayed response (4) Sent Access-Reject Id 164 from 192.168.67.229:1812 to 192.168.67.229:55198 length 20 Waking up in 3.9 seconds. (4) Cleaning up request packet ID 164 with timestamp +1023
*Correction* The response is: (0) Received Access-Request Id 164 from 192.168.67.229:41667 to 192.168.67.229:1812 length 74 (0) User-Name = "test" (0) User-Password = "hellasdo1" (0) NAS-IP-Address = 127.0.1.1 (0) NAS-Port = 10 (0) Message-Authenticator = 0x5728f535d2d332599c9c4dd351860896 (0) # Executing section authorize from file /opt/sinecins/bin/freeradius/etc/raddb/sites-enabled/default (0) authorize { (0) policy filter_username { (0) if (&User-Name) { (0) if (&User-Name) -> TRUE (0) if (&User-Name) { (0) if (&User-Name =~ / /) { (0) if (&User-Name =~ / /) -> FALSE (0) if (&User-Name =~ /@[^@]*@/ ) { (0) if (&User-Name =~ /@[^@]*@/ ) -> FALSE (0) if (&User-Name =~ /\.\./ ) { (0) if (&User-Name =~ /\.\./ ) -> FALSE (0) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) { (0) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE (0) if (&User-Name =~ /\.$/) { (0) if (&User-Name =~ /\.$/) -> FALSE (0) if (&User-Name =~ /@\./) { (0) if (&User-Name =~ /@\./) -> FALSE (0) } # if (&User-Name) = notfound (0) } # policy filter_username = notfound (0) [preprocess] = ok (0) [digest] = noop (0) suffix: Checking for suffix after "@" (0) suffix: No '@' in User-Name = "test", looking up realm NULL (0) suffix: No such realm "NULL" (0) [suffix] = noop (0) IPASS: Checking for prefix before "/" (0) IPASS: No '/' in User-Name = "test", looking up realm NULL (0) IPASS: No such realm "NULL" (0) [IPASS] = noop (0) ntdomain: Checking for prefix before "\" (0) ntdomain: No '\' in User-Name = "test", looking up realm NULL (0) ntdomain: No such realm "NULL" (0) [ntdomain] = noop (0) eap: No EAP-Message, not doing EAP (0) [eap] = noop (0) [files] = noop (0) sql: EXPAND %{User-Name} (0) sql: --> test (0) sql: SQL-User-Name set to 'test' rlm_sql (sql): Reserved connection (1) (0) sql: EXPAND SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id (0) sql: --> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'test' ORDER BY id (0) sql: Executing select query: SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'test' ORDER BY id rlm_sql (sql): Reserved connection (2) rlm_sql (sql): Released connection (2) Need 5 more connections to reach 10 spares rlm_sql (sql): Opening additional connection (6), 1 of 26 pending slots used rlm_sql_sqlite: Opening SQLite database "/opt/sinecins/bin/freeradius.db" (0) sql: EXPAND SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority (0) sql: --> SELECT groupname FROM radusergroup WHERE username = 'test' ORDER BY priority (0) sql: Executing select query: SELECT groupname FROM radusergroup WHERE username = 'test' ORDER BY priority (0) sql: User not found in any groups rlm_sql (sql): Released connection (1) (0) [sql] = notfound (0) [expiration] = noop (0) [logintime] = noop (0) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type (0) pap: WARNING: Authentication will fail unless a "known good" password is available (0) [pap] = noop (0) } # authorize = ok (0) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject (0) Failed to authenticate the user (0) Using Post-Auth-Type Reject (0) # Executing group from file /opt/sinecins/bin/freeradius/etc/raddb/sites-enabled/default (0) Post-Auth-Type REJECT { (0) sql: EXPAND .query (0) sql: --> .query (0) sql: Using query template 'query' rlm_sql (sql): Reserved connection (3) (0) sql: EXPAND %{User-Name} (0) sql: --> test (0) sql: SQL-User-Name set to 'test' (0) sql: EXPAND INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{SQL-User-Name}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S') (0) sql: --> INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 'test', 'hellasdo1', 'Access-Reject', '2020-04-27 19:10:59') (0) sql: Executing query: INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 'test', 'hellasdo1', 'Access-Reject', '2020-04-27 19:10:59') (0) sql: SQL query returned: success (0) sql: 1 record(s) updated rlm_sql (sql): Released connection (3) (0) [sql] = ok (0) attr_filter.access_reject: EXPAND %{User-Name} (0) attr_filter.access_reject: --> test (0) attr_filter.access_reject: Matched entry DEFAULT at line 11 (0) [attr_filter.access_reject] = updated (0) [eap] = noop (0) policy remove_reply_message_if_eap { (0) if (&reply:EAP-Message && &reply:Reply-Message) { (0) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE (0) else { (0) [noop] = noop (0) } # else = noop (0) } # policy remove_reply_message_if_eap = noop (0) } # Post-Auth-Type REJECT = updated (0) Login incorrect (No Auth-Type found: rejecting the user via Post-Auth-Type = Reject): [test] (from client client1 port 10) (0) Delaying response for 1.000000 seconds Waking up in 0.3 seconds. Waking up in 0.6 seconds. (0) Sending delayed response (0) Sent Access-Reject Id 164 from 192.168.67.229:1812 to 192.168.67.229:41667 length 20 Waking up in 3.9 seconds. (0) Cleaning up request packet ID 164 with timestamp +4 Ready to process requests
participants (1)
-
yagiz.onen@siemens.com