在centos7中用iptables命令配置完策略规则后,需要保存策略永久生效,执行service iptables save时提示:
# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
的错误信息的解决方法:
1、先执行如下命令:
systemctl stop firewalld
systemctl mask firewalld
2、安装iptables services
yum install iptables-services
3、设置开机启动
systemctl enable iptables
4、重启iptables service
systemctl restart iptables
5、执行保存配置命令
service iptables save
搬瓦工新手必读教程和推荐套餐
搬瓦工新手选择服务器必备的教程。
1、搬瓦工购买教程:搬瓦工VPS主机购买教程 选择一款合适的外贸主机
2、搬瓦工优惠码:BWH3HYATVBJW
3、搬瓦工套餐推荐:搬瓦工云服务器全部套餐对比列表 可选CN2 GIA和香港机房
4、搬瓦工测试IP:搬瓦工全部数据中心测试IP地址和下载测速文件
5、搬瓦工面板管理:搬瓦工KIWIVM面板的全部功能介绍
搬瓦工VPS的最便宜套餐和最具性价比套餐,简单整理如下:
方案 | CPU | 内存 | 硬盘 | 流量 | 带宽 | 机房 | 价格 | 购买 |
---|---|---|---|---|---|---|---|---|
CN2 GT | 1核 | 1GB | 20GB | 1TB | 1Gbps | DC8等 | $49.99/年 | 购买 |
香港 | 2核 | 2GB | 40GB | 500GB | 1Gbps | 香港 | $89.99/月 | 购买 |
CN2 GIA | 2核 | 1GB | 20GB | 1TB | 2.5Gbps | DC6等 | $49.99/季 | 购买 |
CN2 GIA | 10核 | 32GB | 640GB | 10TB | 10Gbps | DC6等 | $289.99/月 | 购买 |
日本 | 2核 | 1GB | 20GB | 1TB | 2.5Gbps | DC6等 | $49.99/季 | 购买 |
本文结束。
未经允许不得转载:搬瓦工评测网 » Centos 7系统执行service iptables save报错的解决方法