Feature #10348
closed
Add localhost to NTP Interfaces
Added by B T over 4 years ago.
Updated over 4 years ago.
Description
When selecting interfaces its not possible to select localhost unless deselecting all interfaces and enabling the use of a wildcard.
Intended behavior is to be able to enable a select few interfaces AND localhost to enable NAT redirection back to pfSense for clients where NTP settings cant be changed.
Intended behavior can be seen in the DNS Resolver that provides the ability to select interfaces + localhost.
NTPD listens for 127.0.0.1:123 and :: 1: 123 anyway, but this PR allows you to select only Loopback as the listening interface, for cases when you need to do port-forward to loopback and not listen to any other interface:
https://github.com/pfsense/pfsense/pull/4237
I also had a PR ready but I was waiting for the other requests to be merged
i had a different mods for that, i put it here if you like it
function build_interface_list() {
global $pconfig;
$iflist = array('options' => array(), 'selected' => array());
$iflist['options']['lo0'] = gettext("localhost");
if (empty($selectedifs) || empty($selectedifs[0]) || in_array("lo0", $selectedifs)) {
array_push($iflist['selected'], "lo0");
}
- Status changed from New to Pull Request Review
- Target version changed from Future to 2.5.0
- Status changed from Pull Request Review to Feedback
- Assignee set to Renato Botelho
- % Done changed from 0 to 100
PR has been merged. Thanks!
- Status changed from Feedback to Resolved
works as expected on 2.5.0.a.20200323.0902
- Status changed from Resolved to Feedback
- Target version changed from 2.5.0 to 2.4.5-p1
- Status changed from Feedback to Resolved
Localhost is present in the interface list, can be selected, and is in the configuration when chosen. ntpd is bound to it when chosen, as expected.
Also available in: Atom
PDF