Actions
Bug #3611
closedDHCP relay to a server behind the gateway does not work
Start date:
04/19/2014
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1
Affected Architecture:
Description
We have the following setup
WAN: 192.168.15.16/29
LAN: 172.16.18.0/24
DHCP server: 10.156.33.53
iow, the DHCP server is located upstream behind the default gateway. In this setup, DHCP relay never worked.
Apr 19 19:48:24 pfsense php: /services_dhcp_relay.php: The command '/usr/local/sbin/dhcrelay -i vmx3f2 -i wan 10.156.33.134' returned exit code '1', the output was 'Internet Systems Consortium DHCP Relay Agent 4.2.6 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Can't attach interface wan to bpf device /dev/bpf0: Device not configured If you did not get this software from ftp.isc.org, please get the latest from ftp.isc.org and install that before requesting help. If you did get this software from ftp.isc.org and have not yet read the README, please read it before requesting help. If you intend to request help from the dhcp-bugs at isc.org mailing list, please read the section on the README about submitting bug reports and requests for help. Please do not under any circumstances send requests for help directly to the authors of this software - please send them to the appropriate mailing list as described in the README file. exitin
When you look at the flags you notice that the pfSense LAN interface is obviously translated into the correct physical NIC name (vmx3f2), but the wan interface isn't (should be vmx3f0).
The following patch to /etc/inc/services.inc fixes the issue:
--- services.inc.bak 2014-04-19 20:28:22.000000000 +0200 +++ services.inc 2014-04-19 20:28:46.000000000 +0200 @@ -1377,7 +1377,7 @@ if (is_array($config['gateways']['gateway_item'])) { foreach ($config['gateways']['gateway_item'] as $gateway) { if (isset($gateway['defaultgw'])) { - $destif = $gateway['interface']; + $destif = get_real_interface($gateway['interface']); break; } }
Actions