Freeradius dhcp 中继

Freeradius dhcp 中继

我的 Raspberry Pi 上同时运行着 freeradius v3 和 pihole。我有一个外部 NGFW 充当 DHCP 服务器。

我希望 freeradius 将所有 DHCP 请求“转发”到防火墙,为此我想将其配置为 dhcp 中继,就像在文档中一样 ->https://freeradius.org/documentation/freeradius-server/4.0~alpha1/raddb/sites-available/dhcp.relay.html 。我的配置 /etc/freeradius/3.0/sites-available/dhcp.relay 如下所示:

# -*- text -*-
######################################################################
#
#       This is a virtual server that handles DHCP relaying
#
#       Only one server can listen on a socket, so you cannot
#       do DHCP relaying && run a DHCP server at the same time.
#
######################################################################

server dhcp.eth1 {
        listen {
                ipaddr = *
                port = 67
                type = dhcp
                interface = eth1
        }

        #  Packets received on the socket will be processed through one
        #  of the following sections, named after the DHCP packet type.
        #  See dictionary.dhcp for the packet types.

        dhcp Discover {
                &control.Relay-To-IP-Address := 10.10.1.1
                &request.Gateway-IP-Address := 10.10.1.10
                ok
        }
        dhcp Request {
                &control.Relay-To-IP-Address := 10.10.1.1
                &request.Gateway-IP-Address := 10.10.1.1
                ok
        }
}
  • 10.10.1.10是 pihole/freeradius 的 ip
  • 10.10.1.1我的 ngfw/dhcp 服务器的 IP 是什么

但是我的客户端没有获得 DHCP 租约。

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Wi-Fi 6 AX201 160MHz
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::a6bf:884b:a8af:d632%21(Preferred)
   Autoconfiguration IPv4 Address. . : 169.254.93.98(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 140565902
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-B1-E8-CA-B4-45-06-33-F1-7A
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

如果我在客户端上手动设置静态 IP,我就可以 ping/连接到我的网络和 WAN。有人有什么想法吗?

相关内容