mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/freeradius: Fix DHCP support (#2135)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= freeradius
|
||||
PLUGIN_VERSION= 1.9.8
|
||||
PLUGIN_VERSION= 1.9.9
|
||||
PLUGIN_COMMENT= RADIUS Authentication, Authorization and Accounting Server
|
||||
PLUGIN_DEPENDS= freeradius3
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
@@ -15,6 +15,10 @@ The server is fast, feature-rich, modular, and scalable.
|
||||
Plugin Changelog
|
||||
================
|
||||
|
||||
1.9.9
|
||||
|
||||
* Fix DHCP support
|
||||
|
||||
1.9.8
|
||||
|
||||
* Add support for checking TLS certificate names
|
||||
|
||||
@@ -5,6 +5,7 @@ mods-enabled-counter:/usr/local/etc/raddb/mods-enabled/counter
|
||||
mods-enabled-dhcp_sqlippool:/usr/local/etc/raddb/mods-enabled/dhcp_sqlippool
|
||||
mods-enabled-eap:/usr/local/etc/raddb/mods-enabled/eap
|
||||
mods-enabled-ldap:/usr/local/etc/raddb/mods-enabled/ldap
|
||||
mods-enabled-mac2ip:/usr/local/etc/raddb/mods-enabled/mac2ip
|
||||
mods-enabled-sql:/usr/local/etc/raddb/mods-enabled/sql
|
||||
mods-enabled-sqlippool:/usr/local/etc/raddb/mods-enabled/sqlippool
|
||||
queries.conf:/usr/local/etc/raddb/mods-config/sql/main/sqlite/queries.conf
|
||||
|
||||
+3
-3
@@ -24,13 +24,13 @@ sqlippool dhcp_sqlippool {
|
||||
|
||||
sqlippool_log_exists = "DHCP: Existing IP: %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
|
||||
sqlippool_log_success = "DHCP: Allocated IP: %{reply:Framed-IP-Address} from %{control:${..pool_name}} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
sqlippool_log_success = "DHCP: Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
|
||||
sqlippool_log_clear = "DHCP: Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
|
||||
|
||||
sqlippool_log_failed = "DHCP: IP Allocation FAILED from %{control:${..pool_name}} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
sqlippool_log_failed = "DHCP: IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
|
||||
sqlippool_log_nopool = "DHCP: No ${..pool_name} defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
sqlippool_log_nopool = "DHCP: No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{% if helpers.exists('OPNsense.freeradius.general.dhcpenabled') and OPNsense.freeradius.general.dhcpenabled == '1' %}
|
||||
|
||||
# -*- text -*-
|
||||
#
|
||||
# $Id: a4ead1d64e8220344b483718ece4712bef5e9e36 $
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# This next section is a sample configuration for the "passwd"
|
||||
# module, that reads flat-text files.
|
||||
#
|
||||
# The file is in the format <mac>,<ip>
|
||||
#
|
||||
# 00:01:02:03:04:05,192.0.2.100
|
||||
# 01:01:02:03:04:05,192.0.2.101
|
||||
# 02:01:02:03:04:05,192.0.2.102
|
||||
#
|
||||
# This lets you perform simple static IP assignments from a flat-text
|
||||
# file. You will have to define lease times yourself.
|
||||
#
|
||||
######################################################################
|
||||
|
||||
passwd mac2ip {
|
||||
filename = ${modconfdir}/${.:name}/${.:instance}
|
||||
format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
|
||||
delimiter = ","
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user