freeradius 2.0.4, rlm_passwd and dhcp
Evgeniy Kozhuhovskiy
ugenk at mgts.by
Wed May 28 14:32:32 CEST 2008
Hi!
I've installed freeradius 2.0.4, configured dhcp.
In fact, i leave all sample configuration.
from modules{} :
passwd mac2ip {
filename = /usr/local/freeradius204/etc/raddb/dhcppasswd
format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
delimiter = ","
}
deb30# cat /usr/local/freeradius204/etc/raddb/dhcppasswd
2a:00:3e:50:32:d2,93.84.246.130
From debug output:
server dhcp {
modules {
Module: Checking dhcp DHCP-Discover {...} for more modules to load
Module: Linked to module rlm_always
Module: Instantiating ok
always ok {
rcode = "ok"
simulcount = 0
mpp = no
}
Module: Checking dhcp DHCP-Request {...} for more modules to load
Module: Linked to module rlm_passwd
Module: Instantiating mac2ip
passwd mac2ip {
filename = "/usr/local/freeradius204/etc/raddb/dhcppasswd"
format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
delimiter = ","
ignorenislike = yes
ignoreempty = yes
allowmultiplekeys = no
hashsize = 100
}
rlm_passwd: nfields: 2 keyfield 0(DHCP-Client-Hardware-Address) listable: no
Module: Checking dhcp (null) {...} for more modules to load
/usr/local/freeradius204/etc/raddb/sites-enabled/dhcp[202]: No name
specified for Post-Auth-Type block
}
}
But when packet arrived, rlm_passwd says NOTFOUND:
Received DHCP-Discover of id 22424 from 0.0.0.0:68 to 0.0.0.0:67
DHCP-Opcode = Client-Message
DHCP-Hardware-Type = Ethernet
DHCP-Hardware-Address-Length = 6
DHCP-Hop-Count = 0
DHCP-Transaction-Id = 22424
DHCP-Number-of-Seconds = 0
DHCP-Flags = Broadcast
DHCP-Client-IP-Address = 0.0.0.0
DHCP-Your-IP-Address = 0.0.0.0
DHCP-Server-IP-Address = 0.0.0.0
DHCP-Gateway-IP-Address = 0.0.0.0
DHCP-Client-Hardware-Address = 2a:00:3e:50:32:d2
DHCP-Message-Type = DHCP-Discover
DHCP-Client-Identifier = 2a:00:3e:50:32:d2
DHCP-Parameter-Request-List = DHCP-Subnet-Mask
DHCP-Parameter-Request-List = DHCP-Router-Address
DHCP-Parameter-Request-List = DHCP-Time-Server
DHCP-Parameter-Request-List = DHCP-IEN-116-Name-Server
DHCP-Parameter-Request-List = DHCP-Domain-Name-Server
DHCP-Parameter-Request-List = DHCP-Log-Server
DHCP-Parameter-Request-List = DHCP-Quotes-Server
DHCP-Parameter-Request-List = DHCP-LPR-Server
DHCP-Parameter-Request-List = DHCP-Impress-Server
DHCP-Parameter-Request-List = DHCP-RLP-Server
DHCP-Parameter-Request-List = DHCP-Domain-Name
DHCP-Parameter-Request-List = DHCP-Swap-Server
DHCP-Parameter-Request-List = DHCP-NIS-Domain-Name
DHCP-Parameter-Request-List = DHCP-NIS-Servers
DHCP-Parameter-Request-List = DHCP-NTP-Servers
DHCP-Parameter-Request-List = DHCP-X-Window-Font-Server
DHCP-Parameter-Request-List = DHCP-X-Window-Display-Mgr
server dhcp {
Trying sub-section dhcp DHCP-Discover {...}
+- entering group DHCP-Discover
++[reply] returns noop
++[reply] returns noop
++[reply] returns noop
++[mac2ip] returns notfound
++[ok] returns ok
} # server dhcp
Sending DHCP-Offer of id 22424 from 0.0.0.0:67 to 0.0.0.0:68
DHCP-Opcode = Server-Message
DHCP-Hardware-Type = Ethernet
DHCP-Hardware-Address-Length = 6
DHCP-Hop-Count = 0
DHCP-Transaction-Id = 22424
DHCP-Number-of-Seconds = 0
DHCP-Flags = Broadcast
DHCP-Client-IP-Address = 0.0.0.0
DHCP-Your-IP-Address = 0.0.0.0
DHCP-Server-IP-Address = 0.0.0.0
DHCP-Gateway-IP-Address = 0.0.0.0
DHCP-Client-Hardware-Address = 0x2a003e5032d2
DHCP-Server-Host-Name = ""
DHCP-Boot-Filename = ""
DHCP-Subnet-Mask = 255.255.255.128
DHCP-Router-Address = 93.84.246.129
DHCP-Domain-Name-Server = 82.209.240.241
DHCP-Domain-Name-Server = 82.209.243.241
DHCP-IP-Address-Lease-Time = 60
DHCP-DHCP-Server-Identifier = 93.84.246.129
Finished request 0.
Cleaning up request 0 ID 22424 with timestamp +8
Going to the next request
Ready to process requests.
Also i've tried to add such update section:
dhcp DHCP-Discover {
update reply {
DHCP-Message-Type = DHCP-Offer
}
# The contents here are invented. Change them!
update reply {
DHCP-Domain-Name-Server = 82.209.240.241
DHCP-Domain-Name-Server = 82.209.243.241
DHCP-Subnet-Mask = 255.255.255.128
DHCP-Router-Address = 93.84.246.129
DHCP-IP-Address-Lease-Time = 60
DHCP-DHCP-Server-Identifier = 93.84.246.129
}
# This part --->
update reply {
DHCP-Your-IP-Address = 93.84.246.130
DHCP-Client-IP-Address = 93.84.246.130
}
# <---
but it updates only DHCP-Your-IP-Address, not DHCP-Client-IP-Address:
Sending DHCP-Offer of id 10898 from 0.0.0.0:67 to 0.0.0.0:68
DHCP-Opcode = Server-Message
DHCP-Hardware-Type = Ethernet
DHCP-Hardware-Address-Length = 6
DHCP-Hop-Count = 0
DHCP-Transaction-Id = 10898
DHCP-Number-of-Seconds = 0
DHCP-Flags = Broadcast
DHCP-Client-IP-Address = 0.0.0.0
DHCP-Your-IP-Address = 93.84.246.130
DHCP-Server-IP-Address = 0.0.0.0
DHCP-Gateway-IP-Address = 0.0.0.0
DHCP-Client-Hardware-Address = 0x2a003e5032d2
DHCP-Server-Host-Name = ""
DHCP-Boot-Filename = ""
DHCP-Subnet-Mask = 255.255.255.128
DHCP-Router-Address = 93.84.246.129
DHCP-Domain-Name-Server = 82.209.240.241
DHCP-Domain-Name-Server = 82.209.243.241
DHCP-IP-Address-Lease-Time = 60
DHCP-DHCP-Server-Identifier = 93.84.246.129
Finished request 13.
Cleaning up request 13 ID 10898 with timestamp +212
What am i doing wrong?
--
With best regards, Evgeniy Kozhuhovskiy,
Leader of Services team,
Minsk State Phony Network, RUE Beltelecom.
More information about the Freeradius-Users
mailing list