Huawei switchs and MAC address authentication
Pascal Legrand
pascal.legrand at univ-orleans.fr
Tue Apr 9 09:28:16 CEST 2019
Hello,
i've got a litle problem with freeradius authentication.
I use a very simple configuration to make "MAC address" authentication.
My configuration works fine with alcatel switch (OS6450 OS6250)
For alcatel configuration i followed the informations from the
freeradius wiki and i use that :
clients.conf file :
client Alcatel {
ipaddr = 192.168.1.102
secret = password
}
authorize file :
5820B1784219 Cleartext-Password := "5820B1784219", Nom-Machine :=
"PORT-GIM-PRET-2"
Now i'm trying to make the same with Huawei switch
I use the same configuration
client Huawei {
ipaddr = 192.168.1.30
secret = FreeRadius
}
and as you can see the user 5820B1784219 exist in my authorize file.
but each time i try with huawei switch i've got this error message
Auth: (0) Login incorrect (No Auth-Type found: rejecting the user via
Post-Auth-Type = Reject): [5820b1784219/5820b1784219] (from client
Switch-CM3 port 4098 cli 5820B1784219) - Machine Inconnue
When i launch freeradius -X here is the result but i cant understand
what is wrong :
-------------------------------------------------------------------
(0) Received Access-Request Id 122 from 192.168.1.30:56884 to
192.168.1.101:1812 length 277
(0) User-Name = "5820b1784219"
(0) User-Password = "5820b1784219"
(0) NAS-Port = 4098
(0) Service-Type = Framed-User
(0) Framed-Protocol = PPP
(0) Calling-Station-Id = "5820B1784219"
(0) NAS-Identifier = "Classe-Mobile-2"
(0) NAS-Port-Type = Ethernet
(0) NAS-Port-Id = "slot=0;subslot=0;port=1;vlanid=2"
(0) Called-Station-Id = "0C41E97831A3"
(0) NAS-IP-Address = 192.168.1.30
(0) Acct-Session-Id = "Classe-00001000000002e7263a000002a"
(0) Huawei-Startup-Stamp = 1554497501
(0) Huawei-IPHost-Addr = "255.255.255.255 58:20:b1:78:42:19"
(0) Huawei-Connect-ID = 42
(0) Huawei-Version = "Huawei S5720"
(0) Huawei-Product-ID = "S5720"
(0) Huawei-User-Mac = "\000\000\000\002"
(0) # Executing section authorize from file
/etc/freeradius/3.0/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) [chap] = noop
(0) [mschap] = noop
(0) [digest] = noop
(0) suffix: Checking for suffix after "@"
(0) suffix: No '@' in User-Name = "5820b1784219", looking up realm NULL
(0) suffix: No such realm "NULL"
(0) [suffix] = noop
(0) eap: No EAP-Message, not doing EAP
(0) [eap] = noop
(0) files: users: Matched entry DEFAULT at line 181
(0) [files] = ok
(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) EXPAND - Machine Inconnue
(0) --> - Machine Inconnue
(0) Login incorrect (No Auth-Type found: rejecting the user via
Post-Auth-Type = Reject): [5820b1784219/5820b1784219] (from client
Switch-CM3 port 4098 cli 5820B1784219) - Machine Inconnue
(0) Using Post-Auth-Type Reject
(0) # Executing group from file /etc/freeradius/3.0/sites-enabled/default
(0) Post-Auth-Type REJECT {
(0) attr_filter.access_reject: EXPAND %{User-Name}
(0) attr_filter.access_reject: --> 5820b1784219
(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) 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 122 from 192.168.1.101:1812 to
192.168.1.30:56884 length 20
Waking up in 3.9 seconds.
-------------------------------------------------------------------
Thanks for your help
--
Pascal
More information about the Freeradius-Users
mailing list