IPTablesはNTPタイムサーバーを受け入れます

IPTablesはNTPタイムサーバーを受け入れます

私はIPTablesを初めて使用します。正常に動作するような既存の構成があります。Chain RH-Firewall-1-INPUTルールにNTPを正しく追加する方法がわかりません。私の目標は、私のネットワークのNTPサーバーとして機能するためにサーバーにNTP入力を許可する追加のルールを追加することです。iptables -I RH-Firewall-1-INPUT -p udp --dport 123 -j ACCEPTもちろん動作する場合にのみ必要ですか?iptables save -I Insertまたは-A Appendを使用する必要があるのか​​、それとも難しいのかわかりません。以下は私の既存の設定です。iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     esp  --  anywhere             anywhere
ACCEPT     ah   --  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:squid
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

ベストアンサー1

最後のルールが無条件であることを考慮すると、それを追加すると到達不能なルールが生成されるため、REJECTこれを使用します。通信はudp / 123を介してのみ行われるため、通常はトラフィックとRELATED、ESTABLISHEDを許可するだけで十分です。-Intpd

おすすめ記事