安装和配置步骤
-
安装 iptables
- 首先确保
iptables
软件包已安装在系统中。
- 首先确保
-
加载 iptables 模块
- 手动加载需要的内核模块:执行
sudo modprobe iptable_nat
和sudo modprobe iptable_filter
。 - 持久化加载这些模块:将模块名称添加到
/etc/modules-load.d/modules.conf
文件中,以便在系统启动时自动加载。sudo cat <<EOF >/etc/modules-load.d/modules.conf iptable_nat iptable_filter EOF
- 手动加载需要的内核模块:执行
-
重启系统
- 执行
sudo reboot
以使模块加载和任何其他配置更改生效。
- 执行
运行 Rancher 容器
-
创建 Rancher 数据目录