Difference between revisions of "Ntp"

From wiki
Jump to navigation Jump to search
(Created page with "Network Time Protocol, synchronize local clock to remote. To user ntpq the firewall should be open for traffic to the localhost. <syntaxhighlight lang=bash> iptables -A INPUT...")
 
Line 3: Line 3:
 
To user ntpq the firewall should be open for traffic to the localhost.
 
To user ntpq the firewall should be open for traffic to the localhost.
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
iptables -A INPUT -p all -j ACCEPT -s 127.0.0.1 -d 127.0.0.1
+
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -p all -j ACCEPT -s 127.0.0.1 -d 127.0.0.1
+
iptables -A OUTPUT -o lo -j ACCEPT
ip6tables -A INPUT -p all -j ACCEPT -s ::1 -d ::1
+
ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A OUTPUT -p all -j ACCEPT -s ::1 -d ::1
+
ip6tables -A OUTPUT -o lo -j ACCEPT
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 16:56, 22 September 2018

Network Time Protocol, synchronize local clock to remote.

To user ntpq the firewall should be open for traffic to the localhost.

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A OUTPUT -o lo -j ACCEPT