From: Renaud Métrich Date: Thu, 24 Nov 2011 09:42:57 +0000 (+0100) Subject: Updated DHCP configuration template to be able to act as a DHCP server when on a... X-Git-Tag: release_2_2_0~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c22621506df10ebc1e4ee4e98e0d2033d05a29c7;p=thirdparty%2Ffreeradius-server.git Updated DHCP configuration template to be able to act as a DHCP server when on a gateway on Linux --- diff --git a/raddb/sites-available/dhcp b/raddb/sites-available/dhcp index 2639900c58b..d1257d0a504 100644 --- a/raddb/sites-available/dhcp +++ b/raddb/sites-available/dhcp @@ -93,19 +93,41 @@ server dhcp { # # The other only solution is to update FreeRADIUS to use BPF sockets. # -listen { - ipaddr = 127.0.0.1 - port = 6700 - type = dhcp -# interface = lo0 - - # The DHCP server defaults to allowing broadcast packets. - # Set this to "no" only when the server receives *all* packets - # from a relay agent. i.e. when *no* clients are on the same - # LAN as the DHCP server. - # - # It's set to "no" here for testing. - broadcast = no + + # When the machine is not Linux, or has only one network interface, use + # the following listener: + listen { + # Listen for broadcasts + unicast on lo0 + ipaddr = * + port = 6700 + type = dhcp + interface = lo0 + # The DHCP server defaults to allowing broadcast packets. + # Set this to "no" only when the server receives *all* packets + # from a relay agent. i.e. when *no* clients are on the same + # LAN as the DHCP server. + # + # It's set to "no" here for testing. + broadcast = no + } + # When the machine is Linux and has multiple network interfaces, use + # the following listeners instead: + listen { + # Listen for broadcasts on lo0 + ipaddr = 255.255.255.255 + port = 6700 + type = dhcp + interface = lo0 + } + listen { + # Listen for unicast on our IP address, not bound to any + # interface but telling on which interface to forward the + # packets to. + ipaddr = 127.0.0.1 + port = 6700 + type = dhcp + arp_interface = lo0 + } # On Linux if you're running the server as non-root, you # will need to do: @@ -113,8 +135,7 @@ listen { # sudo setcap cap_net_admin=ei /path/to/radiusd # # This will allow the server to set ARP table entries - # for newly allocated IPs -} + # for newly allocated IPs, but this has not been tested. # Packets received on the socket will be processed through one # of the following sections, named after the DHCP packet type.