すべてのプロダクト
Search
ドキュメントセンター

Server Migration Center:「TCPラッパーの構成が影響します」というエラーメッセージが表示された場合はどうすればよいですか?

最終更新日:Oct 21, 2024

このトピックでは、Server Migration Center (SMC) を使用してLinuxオペレーティングシステムを移行するときに報告される「TCPラッパー構成の影響」エラーメッセージの原因について説明します。 このトピックでは、エラーを解決する方法についても説明します。

問題の説明

「TCPラッパーの構成が影響します」というエラーメッセージは、SMCを使用してLinuxオペレーティングシステムをAnolis OSに移行すると報告されます。

原因

Anolis OS 8はTCPラッパーをサポートしなくなりました。

解決策

TCPラッパーは、アプリケーションレベルで着信接続をブロックするために使用できるシンプルなツールを提供します。 以前は、ファイアウォールはLinuxでは使用できず、TCPラッパーを使用してアクセスセキュリティを確保していました。 これで、firewalldを使用してTCPラッパーを置き換えることができます。

次の例は、SSHアクセスを制限するTCPラッパーを置き換えるようにfirewalldを設定する方法を示しています。

  • /etc/hosts.de nyファイルの内容:

    #
    # hosts.deny	This file contains access rules which are used to
    #		deny connections to network services that either use
    #		the tcp_wrappers library or that have been
    #		started through a tcp_wrappers-enabled xinetd.
    #
    #		The rules in this file can also be set up in
    #		/etc/hosts.allow with a 'deny' option instead.
    #
    #		See 'man 5 hosts_options' and 'man 5 hosts_access'
    #		for information on rule syntax.
    #		See 'man tcpd' for information on tcp_wrappers
    #
    sshd: ALL
  • /etc/hosts.allowファイルの内容:

    #
    # hosts.allow This file contains access rules which are used to
    # allow or deny connections to network services that
    # either use the tcp_wrappers library or that have been
    # started through a tcp_wrappers-enabled xinetd.
    #
    # See 'man 5 hosts_options' and 'man 5 hosts_access'
    # for information on rule syntax.
    # See 'man tcpd' for information on tcp_wrappers
    #
    sshd: 192.168.20.100 192.168.20.101 
    sshd: 192.168.15.16/29
  1. ソースサーバーに接続します。 詳細については、「インスタンスへの接続」をご参照ください。

  2. 次のコマンドを実行してfirewalldをインストールし、サービスを開始します。

    yum install -y firewalld
    systemctl enable firewalld
    systemctl restart firewalld
  3. 次のコマンドを実行して、firewalldのデフォルトゾーンからSSHサービスを削除します。

    デフォルトでは、firewalldのデフォルトゾーンでSSHが有効になっています。 デフォルトゾーンはパブリックゾーンとも呼ばれます。

    firewall-cmd --permanent --remove-service=ssh
  4. 次のコマンドを実行して、firewalldゾーンを作成します。

    firewall-cmd --permanent --new-zone=sshzone
  5. 次のコマンドを実行して、SSHサービスとネットワークフィルター条件をsshzoneに追加します。

    firewall-cmd --permanent --zone=sshzone --add-source=192.168.20.100
    firewall-cmd --permanent --zone=sshzone --add-source=192.168.20.101
    firewall-cmd --permanent --zone=sshzone --add-source=192.168.15.16/29
    firewall-cmd --permanent --zone=sshzone --add-service=ssh
  6. 次のコマンドを実行して、設定を読み込みます。

    firewall-cmd --reload
  7. /etc/hosts.allowおよび /etc/hosts.de nyファイルのコンテンツをコメントアウトします。

  8. エラーが解決したら、SMCクライアントを実行し、移行ジョブを再試行します。 詳細については、「SMCクライアントの実行」をご参照ください。