How to install NTP server on Debian?

Discussion in '3CX Phone System - General' started by Edi Kojsi, Nov 29, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. Edi Kojsi

    Joined:
    Nov 28, 2017
    Messages:
    25
    Likes Received:
    0
    I have a customer where the phones don't have access to internet (for security reasons).

    How to install NTP server on Debian 9, so the phones can adjust time from it, the phones and PBX are in different local-area subnets (layer 3 routing, without NAT).
     
  2. Corné Hokke

    Joined:
    Nov 3, 2017
    Messages:
    5
    Likes Received:
    0
  3. Edi Kojsi

    Joined:
    Nov 28, 2017
    Messages:
    25
    Likes Received:
    0
    Thank you Corne,

    should I modify also IPtables to allow traffic to port 123 UDP from other local subnets or to modify restrict statement into NTP configuration file?
    In 3CX parameters, the PBX address is set as an NTP server for phones, I guess they have a firewall issue to get time from 3CX server?
     
  4. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Perform the following steps:

    1. Install ntp server:
    apt-get install ntp

    2. Edit /etc/ntp.conf and configure broadcast (uncomment it and adjust the network):
    broadcast 192.168.123.255

    3. Execute the following command and check status:

    systemctl restart ntp
    ntpq -p


    4. Configure firewall (iptables):

    iptables -A INPUT -p udp --dport 123 -j ACCEPT
    iptables -A OUTPUT -p udp --sport 123 -j ACCEPT


    5. Make changes permanent (in order to be active after reboot):

    /usr/sbin/netfilter-persistent save
    update-rc.d ntp enable


    That's all. Should be enough.
    You need to set also in 3CX the local IP address of 3CX as NTP server (in Settings | Parameters) and reprovision phones in order new NTP server settings to take effect.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #4 sip.bg, Dec 18, 2017
    Last edited: Dec 18, 2017
    Juan Marriott and Edi Kojsi like this.
Thread Status:
Not open for further replies.