16.1.2. Ubuntu

16.1.2.3. 设置静态IP

设置静态IP

  • 需要禁用cloud-init

  • 需要设置netplan的配置为静态IP。

vim /etc/cloud/cloud.cfg.d/99-disable-cloud-init.cfg

添加如下代码:

network: {config: disabled}

重启。

16.1.2.4. 设置防火墙

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