#!/bin/sh # # This sets up an NTP internal server # It works with FloppyFW version 2.0.4, I have not tried # other versions. # # Enjoy # -- Jim # # You need to change the external servers below, and # set BROADCAST_TIME if you want to use broadcastclient on # the internal net. # BROADCAST_TIME=1 # Set up regular ntp config file in /etc/ntp.conf # See http://www.eecis.udel.edu/~ntp/ntp_spool/html/ # for details. # # Add servers appropriate to your location below. # A list of public servers can be found at # http://www.eecis.udel.edu/~mills/ntp/servers.html # # If you don't have DNS running you'll need to # give numeric IP addresses. # cat </etc/ntp.conf # # This file generated by post-ntp.ini Do not edit. # # The local clock. It will only be used if there's # nothing better. # server 127.127.1.0 # Add real NTP servers here # EOF if [ ${BROADCAST_TIME} ] then . /etc/config . /etc/inside.info echo "broadcast ${INSIDE_BROADCAST}" >> /etc/ntp.conf fi # # Punch a hole in the firewall to let NTP traffic in and out # you may want to do this in firewall.ini, or elsewhere so that # all the rules are in one place. # iptables -A INPUT -p udp --dport ntp -j ACCEPT iptables -A INPUT -p udp --sport ntp -j ACCEPT iptables -A OUTPUT -p udp --dport ntp -j ACCEPT iptables -A OUTPUT -p udp --sport ntp -j ACCEPT echo "Opened udp access on port 123 for NTP" # -g says force the clock the first time. /bin/ntpd -g echo "ntpd started for service $SERVICE."