mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Auto-add firewall rules for DHCP Relay, same as is done for DHCP Server. Add filter reload to DHCP Relay config so rules are immediately added/removed. Ticket #4558
This commit is contained in:
parent
66999e391c
commit
1ab880ef23
@ -3333,6 +3333,19 @@ EOD;
|
||||
}
|
||||
|
||||
}
|
||||
/* allow access to DHCP relay on interfaces */
|
||||
if(isset($config['dhcrelay']['enable'])) {
|
||||
$dhcifaces = explode(",", $dhcrelaycfg['interface']);
|
||||
foreach ($dhcifaces as $dhcrelayif) {
|
||||
if ($dhcrelayif = $on) {
|
||||
$ipfrules .= <<<EOD
|
||||
# allow access to DHCP relay on {$oc['descr']}
|
||||
pass in {$log['pass']} quick on \${$oc['descr']} proto udp from any port = 68 to 255.255.255.255 port = 67 tracker {$increment_tracker($tracker)} label "allow access to DHCP relay"
|
||||
|
||||
EOD;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@
|
||||
##|-PRIV
|
||||
|
||||
require("guiconfig.inc");
|
||||
require_once("filter.inc");
|
||||
require_once('classes/Form.class.php');
|
||||
|
||||
$pconfig['enable'] = isset($config['dhcrelay']['enable']);
|
||||
@ -147,7 +148,7 @@ if ($_POST) {
|
||||
$retval = 0;
|
||||
$retval = services_dhcrelay_configure();
|
||||
$savemsg = get_std_save_message($retval);
|
||||
|
||||
filter_configure();
|
||||
}
|
||||
}
|
||||
|
||||
@ -226,4 +227,4 @@ else {
|
||||
$form->add($section);
|
||||
print $form;
|
||||
|
||||
include("foot.inc");
|
||||
include("foot.inc");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user