I have a Linux server that gets a time offset for some strange reason. I set up cron job to run and update the time using the following command:/usr/sbin/ntpdate pool.ntp.orgThe problem is the command would not run because I have a firewall (iptables).I have always used IP to allow traffic in my network:iptables -A INPUT -p tcp -m tcp -i eth0 -s 11.11.11.11 --dport 5060 -j ACCEPTI would like to know how to do it using a domain name in this case would be pool.ntp.org, or maybe someone could tell me a better way to keep the clocks in sync.
Allowing a domain name in my IP Tables
linux;iptables;clock;ntp
To allow a NTP client to talk to a server you can use these rules:$ sudo iptables -A OUTPUT -p udp --dport 123 -j ACCEPT$ sudo iptables -A INPUT -p udp --sport 123 -j ACCEPTTo act as a NTP server and accept client connections:$ sudo iptables -A INPUT -p udp --dport 123 -j ACCEPT$ sudo iptables -A OUTPUT -p udp --sport 123 -j ACCEPTReferencesWhat are the iptables rules to permit ntp?