デフォルトでは、Container-Optimized OS のホスト ファイアウォールを使用すると SSH サービスのみを介した発信接続と受信接続が許可されます。Container-Optimized OS を実行している VM インスタンスで sudo iptables -L を実行することで、正確なホスト ファイアウォール構成を確認できます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-19 UTC。"],[[["\u003cp\u003eBy default, Container-Optimized OS allows outgoing connections and only accepts incoming connections via SSH, as seen with the \u003ccode\u003esudo iptables -L\u003c/code\u003e command, but this might vary with other Google Cloud products.\u003c/p\u003e\n"],["\u003cp\u003eUsing Docker's \u003ccode\u003e-p\u003c/code\u003e option automatically configures the host firewall for network accessibility when deploying a container on Container-Optimized OS without \u003ccode\u003e--net=host\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor IPv6 accessibility, the host firewall must be manually configured using \u003ccode\u003eip6tables\u003c/code\u003e commands because Docker does not automatically configure the IPv6 rules.\u003c/p\u003e\n"],["\u003cp\u003eWhen deploying a container on Container-Optimized OS with Docker's \u003ccode\u003e--net=host\u003c/code\u003e option, you must manually configure the host firewall with \u003ccode\u003eiptables\u003c/code\u003e commands.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure persistent host firewall configurations across reboots when using \u003ccode\u003eiptables\u003c/code\u003e commands, utilize \u003ccode\u003ecloud-init\u003c/code\u003e to set up the firewall rules, such as allowing incoming TCP connections on port 80.\u003c/p\u003e\n"]]],[],null,[]]