Project

General

Profile

Actions

Feature #10348

closed

Add localhost to NTP Interfaces

Added by B T almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Low
Category:
NTPD
Target version:
Start date:
03/15/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:

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.

Actions #1

Updated by Viktor Gurov almost 5 years ago

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

Actions #2

Updated by Manuel Piovan almost 5 years ago

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");
        }

Actions #3

Updated by Jim Pingle almost 5 years ago

  • Status changed from New to Pull Request Review
  • Target version changed from Future to 2.5.0
Actions #4

Updated by Renato Botelho almost 5 years ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

Actions #5

Updated by Viktor Gurov over 4 years ago

  • Status changed from Feedback to Resolved

works as expected on 2.5.0.a.20200323.0902

Actions #6

Updated by Jim Pingle over 4 years ago

  • Status changed from Resolved to Feedback
  • Target version changed from 2.5.0 to 2.4.5-p1
Actions #7

Updated by Jim Pingle over 4 years ago

  • 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.

Actions

Also available in: Atom PDF