Ubuntu ========== .. toctree:: :maxdepth: 2 :caption: 目录 包管理 cloud-init 设置静态IP ----------------------------------- `设置静态IP `_ * 需要禁用cloud-init * 需要设置netplan的配置为静态IP。 .. code-block:: bash vim /etc/cloud/cloud.cfg.d/99-disable-cloud-init.cfg 添加如下代码: .. code-block:: text network: {config: disabled} 重启。 设置防火墙 ------------------------------------ .. code-block:: bash ufw allow from 117.139.13.178 to any port 80 ufw allow from 121.15.167.225 to any port 80 ufw allow from 121.15.167.225 to any port 443 ufw allow from 117.139.13.178 to any port 10000 ufw allow from 47.108.190.181 to any port 10000