• 締切済み

ntp.confについて

restrict default nomodify notrap noqueryの defaultが何を指しているのかわからないのですが、 全体の意味として分かる方、いらっしゃいますでしょうか? 宜しくお願いします。

みんなの回答

  • kittyguy
  • ベストアンサー率75% (6/8)
回答No.1

defaultは基本設定を指します。 (他に許可設定が無い場合に適用される設定となります。) restrict default nomodify notrap noqueryの場合は変更、トラップ、問合せの各NTPパケットを無視します。

関連するQ&A

  • ntp.confの設定

    設定ファイル中の最初の2行と、restrict default ignoreの意味の違いを教えてください。両方記載されている例や、デフォルト2行をコメントアウトして、restrict default ignoreを追記しいる例がありました。 デフォルトの記載も、追記した記載も「全NTP通信許可しない」だと思っていたので困惑しています。 詳しい方がいましたら、教えてください。よろしくお願いします。 [デフォルト] restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery [追記されている場合がある] restrict default ignore

  • NTPのrestrictについて

    ntpのrestrict定義についてどなたか教えていただけないでしょうか。 あるLinuxサーバでntp.confに以下の設定がされているとします。 (このLinuxサーバはクライアントとします。210.173.160.87、57、27がNTPサーバのIPとします。) ---------------------------------------------------------- restrict 210.173.160.87 mask 255.255.255.0 nomodify notrust notrap restrict 210.173.160.57 mask 255.255.255.0 nomodify notrust notrap restrict 210.173.160.27 mask 255.255.255.0 nomodify notrust notrap server 210.173.160.87 server 210.173.160.57 server 210.173.160.27 ---------------------------------------------------------- この場合、3つのNTPサーバに対してrestrictをオプション付きで 設定しています。この設定ですとNTPサーバからの時計合わせに 応じるが、自分の時計には使用しない・時刻の変更要求などは 無視・トラップを上げないという内容になるかと思います。 これは、NTPサーバからの悪意を持った変更要求を防ぐ意味に なるのでしょうか?それとも、この設定の仕方だとrestrictの 意味がないのでしょうか? 以上、よろしくお願いいたします。

  • NTPサーバについて

    Solaris10のSPARK版でNTPサーバを作りたいのですが 今、/etc/inet/ntp.serverをコピーし/etc/inetntp.confを作りファイルの中を書き換えました。 restrict default nomodify notrap noquery server 133.40.41.175 server 130.69.251.23 server 127.127.1.0 fudge 127.127.1.0 stratum 10 #broadcast 224.0.1.1 ttl 4 #enable auth monitor driftfile /var/ntp/ntp.drift #statsdir /var/ntp/ntpstats/ #filegen peerstats file peerstats type day enable #filegen loopstats file loopstats type day enable #filegen clockstats file clockstats type day enable #keys /etc/inet/ntp.keys #trustedkey 0%) #requestkey 0%) #controlkey 0%) restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap logfile /var/log/ntp 同期が取れているか確認のコマンドを打つと # ntpq -p localhost: timed out, nothing received ***Request timed out となってしまいます。 何が原因なのでしょうか? 何方かご教示下さい。 宜しくお願い致します。

  • NTPサーバ時刻同期の設定を教えて下さい

    FreeBSD6.1 にて NTPサーバを作成しています。 server1(FreeBSD6.1) 192.168.100.1 router1 192.168.100.2(server1側) 192.168.200.2(client側) client1(windows2000) 192.168.200.1 ntp.confは server 133.100.9.2 server 127.127.1.0 fudge 127.127.1.0 stratum 10 driftfile /var/db/ntp.drift restrict default ignore restrict 133.100.9.2 nomodify noquery notrap restrict 127.0.0.0 mask 255.0.0.0  restrict 192.168.100.0 mask 255.255.255.0 notrust nomodify noquery restrict 192.168.200.0 mask 255.255.255.0 notrust nomodify noquery rc.confには xntpd_enable="YES" xntpd_program="/usr/sbin/ntpd" xntpd_flags="-p /var/run/ntpd.pid -c /etc/ntp/ntp.conf" ntpdate_enable="YES" ntpdate_program="/usr/sbin/ntpdate" ntpdate_flags="clock.nc.fukuoka-u.ac.jp" 現在server1 を clock.nc.fukuok で時刻同期は ntpq -p にて確認し、 remote refid St *clock.nc.fukuok .GPS. 1 LOCAL(0) LOCAL(0) 10 *印がついているので外部NTPサーバとは同期がとれているように思えます。 ipfilterは使用していません。 client1(windows2000)より net time /setsntp:192.168.200.1 をしてコマンド正常終了を確認。server1とclient1の時刻誤差は12時間以内です。ping 192.168.200.1はOKです。 最初に一回だけ同期を合せようと net time \\192.168.200.1 /set /yes を行うと システムエラー53が発生。 ネットワークパスが見つかりません。と表示されました。 あとは、 client1で w32tm -once を行うと、 sending to server 48byte で止まります。 桜時計などで外部とのNTPサーバとは同期が取れます。 FreeBSDとwindowsを同期させるにはなにかFreeBSD側にソフトをインストールする必要があるのでしょうか?それとも設定がおかしいのでしょうか? すみませんが教えて下さい。

  • ntpでrestrictのネットワーク指定が効かない

    Red Hat Enterprise Linux ES v.3にて RPMに入っているntp-4.1.2-4を使用して、この サーバを内部のNTPサーバとしています。 /etc/ntp.confの中で 許可するネットワーク指定で restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap と記述しているのですが、このネットワークアドレスの NTPクライアントからなぜか時刻を合わす事ができませんでした。(クライアントもntpdを使用しています) もしやと思い、restrict 192.168.1.2 notrust nomodify notrap とIPアドレス指定をしたら、NTPクライアントから時刻 合わせを行う事ができました。 留意事項  ・このサーバと外部の公共NTPサーバの時刻合わせは   正常に完了している。  ・/etc/ntp.confの変更後、ntpdをrestartさせて   いますが、NTPサーバの時刻が十分安定してから   NTPクライアントは合わせに行っています。  ・NTPサーバとNTPクライアントの時刻は大きくずれて   いると合わせないと聞いた事があるので、実行前に   1秒単位の誤差しかないよう、dateコマンドで合わ   せました。 ネットワーク指定が効かないと、NTPクライアントの数 分記述を入れなければならないので避けたいのです。 原因と回避方法を教えてください。

  • CentOSのNTP時刻同期エラー

    表題の通りCentOSのNTPサーバーエラーについて質問します。 状況 CentOSでNTPを使用していたのですが、気がついた時には NTPサーバーがエラーで止まっていました。  内容を確認してみると、/etc/ntp.confで設定している同期するサーバーと ntpq -p で確認するサーバーが違っている事に気が付きました。 このntpqコマンドで確認できるサーバーは、昔使っていた古いアドレスの物で 現在は使われていない為に今回のエラーになっていると考え、 設定されている場所を探したのですが、見つからなかった為、 yum erase ntp* で一旦全て削除して、 yum install ntp* で再インストールを 行いましたが、状態が変わりませんでした。 現在のntp.confの内容============================================== # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. #restrict default kod nomodify notrap nopeer noquery #restrict -6 default kod nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could# be tightened as well, but to do so would effect some o f# the administrative functions.#restrict 127.0.0.1 #restrict -6 ::1 #ipv6 # Hosts on local network are less restricted. # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.centos.pool.ntp.org #server 1.centos.pool.ntp.org #server 2.centos.pool.ntp.org server 133.100.9.2 #clock.nc.fukuoka-u.ac.jp server 210.173.160.27 #ntp1.jst.mfeed.ad.jp server 202.224.32.4 #ntp.asahi-net.or.jp #broadcast 192.168.1.255 key 42 # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 key 42 # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 key 42 # manycast client # Undisciplined Local Clock. This is a fake driver intended for backup # and when no outside source of synchronized time is available. #server 127.127.1.0 # local clock #fudge 127.127.1.0 stratum 10 # Drift file. Put this in a directory which the daemon can write to. # No symbolic links allowed, either, since the daemon updates the file # by creating a temporary in the same directory and then rename()'ing # it to the file. driftfile /var/lib/ntp/drift # Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys # Specify the key identifiers which are trusted. #trustedkey 4 8 42 # Specify the key identifier to use with the ntpdc utility. #requestkey 8 # Specify the key identifier to use with the ntpq utility. #controlkey 8 ======================================================== ntpq -p で確認した内容==================================== remote refid st t when poll reach delay offset jitter ============================================================================== clock.nc.fukuok .GPS. 1 u 45 64 1 25.585 22436.7 0.002 ntp1.jst.mfeed. 210.173.176.251 2 u 44 64 1 5.803 22465.5 0.002 orion.asahi-net 133.243.238.244 2 u 43 64 1 5.787 22495.2 0.002 ============================================================================== この時、/var/log/messageには何もログは表示されていません。 また、ntpdate -u -b clock.nc.fukuoka-u.ac.jp で強制的に時刻同期させると 以下のように時刻の同期ができます。 29 Sep 22:17:15 ntpdate[29572]: step time server 133.100.9.2 offset 27.863054 sec 以上の内容から、ntpq -p で表示されている古いサーバー情報がどこかに 残っている為に、今回のエラーになっていると思えるのですが、 自分では、どこに残っているのかがわからない為、 皆様のお知恵をお借りできれば幸いです。 宜しくお願い致します。

  • NTPサーバについて教えてください

    RedHat Enterprise Linux ES4のサーバを社内LAN上でNTPサーバとして構築し、外部のNTPサーバと時刻同期ができるところまでは確認できましたが、社内LAN上の他のサーバ(Windows及びLinux)やPC(XP Pro)から時刻同期を行おうとしても、「時刻データが利用できなかったため、コンピュータは同期を取り直しませんでした」というメッセージが出て時刻同期ができません。 ntp.confの内容は、 ------------------------- server xxx.xxx.xxx.xxx 外部NTPサーバ restrict default ignore restrict 127.0.0.1 restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap notrust # server 127.127.1.0 # fudge 127.127.1.0 stratum 10 driftfile /etc/ntp.drift #multicastclient # listen on default 224.0.1.1 #broadcastdelay 0.008 authenticate no --------------------- のような感じです。 社内LANのIPアドレスは、192.168.10体系と192.168.11体系です。 このNTPサーバに対して、他のサーバやPCからはpingはOKで、間にfirewallが入っていたりルータが入っていたりすることはありません。 ntp.confの設定がまずいのか、RedHatのFirewallのせいか、それとも他の設定が何かあるのか、皆目見当がつきません。 どうしたらよいのか、どこか確認すべき項目はないか、などアドバイス頂ければ助かります。 よろしくお願い致します。

  • Windows NTPをLinuxクライアントに公開したいのですが。。。

    こんにちは。 Windowsサーバ(2003)を立てているのですが、 Linuxの検証を行うために、NTPを提供したいと考えています。 URL[http://support.microsoft.com/kb/875424/ja]を参考にしながら設定を行ったところ、 Linuxから ntpdateは正常に動作するのですが、 ntpq -p を行ったところ、いつまで経っても同期してくれません remote refid st t when poll reach delay offset jitter ============================================================================== 192.168.1.1 xx.xx.xx.xx 2 u 30 64 377 0.214 1016.96 13.272 xx.xx.xx.xxは外部のNTPサーバです。 これで、先頭に *も+もつかない状態です。 どなたかご助言いただけませんでしょうか。 /etc/ntp.conf #--------------- restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server 192.168.1.1 prefer # server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift keys /etc/ntp/keys #--------------

  • NTPによる時刻同期

    よろしくお願いします。NTPで同期ができなくて困っています。 当方、Windows2000サーバのWindowsTimeを使って内部NTPサーバを立てていますが、 この2000サーバに対してWindowsクライアントから同期をとると成功しますが、 Linuxクライアントからは失敗してしまいます。 ですが、このLinuxクライアントから外部の公開NTPサーバに対しては成功します。 W2K⇔Linuxの場合、特別な設定が必要なのでしょうか? ※失敗例 [root@hogehoge ~]# ntpdate -d 172.16.10.200 25 Sep 16:07:07 ntpdate[31987]: ntpdate 4.2.0a@1.1190-r Sun Aug 13 01:49:13 CDT 2006 (1) Looking for host 172.16.10.200 and service ntp host found : transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) receive(172.16.10.200) transmit(172.16.10.200) 172.16.10.200: Server dropped: Server has gone too long without sync server 172.16.10.200, port 123 stratum 2, precision -7, leap 00, trust 000 refid [172.16.10.200], delay 0.03358, dispersion 0.00031 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 15:28:16.000 originate timestamp: caa3321b.c4189374 Tue, Sep 25 2007 16:07:07.766 transmit timestamp: caa3321b.a609edbf Tue, Sep 25 2007 16:07:07.648 filter delay: 0.03470 0.03358 0.03363 0.03363 0.00000 0.00000 0.00000 0.00000 filter offset: 0.118582 0.117779 0.117554 0.117305 0.000000 0.000000 0.000000 0.000000 delay 0.03358, dispersion 0.00031 offset 0.117779 25 Sep 16:07:07 ntpdate[31987]: no server suitable for synchronization found ※他のサーバでは成功しているし、Portも開放しているつもりです [root@hogehoge ~]# netstat -a -n | grep :123 udp 0 0 172.16.10.10:123 0.0.0.0:* udp 0 0 192.168.0.1:123 0.0.0.0:* udp 0 0 127.0.0.1:123 0.0.0.0:* udp 0 0 0.0.0.0:123 0.0.0.0:* udp 0 0 :::123 :::* ※ntp.conf [root@hogehoge etc]# cat ntp.conf # server 134.***.***.*** server 172.16.10.200 restrict default notrap nomodify noquery notrust noserve restrict 127.0.0.1 # restrict 172.16.0.0 mask 255.255.0.0 nopeer notrap nomodify restrict 172.16.10.200 mask 255.255.255.255 nopeer notrap nomodify restrict 134.160.82.20 mask 255.255.255.255 nopeer notrap nomodify server 127.127.1.0 fudge 127.127.1.0 stratum 11 driftfile /var/lib/ntp/drift disable auth ※このように、172.16.10.200はremoteの出力がありません。  なぜでしょうか・・・ [root@hogehoge etc]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *ring.***.*** 134.***.***.*** 2 u 4 64 37 29.347 9.640 16.800 0.0.0.0 2 u 3 64 0 0.000 0.000 4000.00 LOCAL(0) LOCAL(0) 11 l 1 64 37 0.000 0.000 0.001 以上、よろしくお願いします

  • Cent OS上のntpサーバ同期不可について

    【環境】 ・CentOS release 5.8 (Final) ・ntp4.2.2p1-15.el5.centos.1 【事象】 ntpq -p投入後、以下エラー表示されます。 --------------------------- localhost.localdomain: timed out, nothing received ***Request timed out ---------------------------- 【設定済項目】 ◆ntp.conf restrict default ignore restrict 127.0.0.1 restrict 210.173.160.27 nomodify notrap #ntp1.jst.mfeed.ad.jp restrict 210.173.160.57 nomodify notrap #ntp2.jst.mfeed.ad.jp restrict 210.173.160.87 nomodify notrap #ntp3.jst.mfeed.ad.jp server ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp server ntp3.jst.mfeed.ad.jp server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift keys /etc/ntp/keys ◆hosts.allow ALL: 210.173.160.27 ALL: 210.173.160.57 ALL: 210.173.160.87 ◆iptables Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:ntp Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ◆/var/log/messages 特にエラー表示なし ◆service ntpd status ntpd (pid 22208) を実行中... ◆netstat udp 0 0 :::123 :::* ----------------------------------------------- ntpdの再起動をしても同現象です。 困っています。 宜しくお願い致します。