The easy way is to use iptables-persistent.

Install iptables-persistent:

sudo apt-get install iptables-persistent

After it's installed, you can save/reload iptables rules anytime:

sudo /etc/init.d/iptables-persistent save
sudo /etc/init.d/iptables-persistent reload

Ubuntu 16.04 Server

The installation as described above works without a problem, but the two commands for saving and reloading above do not seem to work with a 16.04 server. The following commands work with that version:

sudo netfilter-persistent save
sudo netfilter-persistent reload


How to save rules of the iptables?的更多相关文章

  1. How can i use iptables save on centos 7?

    I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for ht ...

  2. How to allow/block PING on Linux server – IPTables rules for icmp---reference

    BY ADMIN - APRIL, 9TH 2014 The ‘PING’, it’s a command-line tool to check a host is reachable or not. ...

  3. 解决service iptables save出错please try to use systemctl

    # service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...

  4. iptables中文介绍 、基本使用操作命令(转)

    iptables 命令介绍   原文链接http://www.cnblogs.com/wangkangluo1/archive/2012/04/19/2457072.html iptables防火墙可 ...

  5. Iptables防火墙

    1 位置 使用vim /usr/sysconfig/iptables 2 启动.关闭.保存 service iptables stop service iptables start service i ...

  6. iptables 命令介绍

    http://www.cnblogs.com/wangkangluo1/archive/2012/04/19/2457072.html iptables 防火墙可以用于创建过滤(filter)与NAT ...

  7. linux中iptables配置文件及命令详解详解

    iptables配置文件 直接改iptables配置就可以了:vim /etc/sysconfig/iptables. 1.关闭所有的 INPUT FORWARD OUTPUT 只对某些端口开放. 下 ...

  8. Linux的iptables常用配置范例(2)

    iptables -F   #清除所有规则 iptables -X  #清除所有自定义规则 iptables -Z   #各项计数归零 iptables -P INPUT DROP  #将input链 ...

  9. Linux iptables 防火墙详解

    0x00 iptables介绍 linux的包过滤功能,即linux防火墙,它由netfilter 和 iptables 两个组件组成. netfilter 组件也称为内核空间,是内核的一部分,由一些 ...

随机推荐

  1. HQL的使用和limit的替代

    1.HQL不同于SQL,from必须是项目中table反转后对应的class的名字. 2.如何使用参数生成HQL语句: String hql = "from User where userI ...

  2. python科学计算与可视化

    一.Numpy 库 NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库. 引用: import ...

  3. 关于Vue中main.js,App.vue,index.html之间关系进行总结

    在初始化的Vue项目中,我们最先接触到的就是main.js,App.vue,index.html这三个文件,我们从培训视频或者官方文档上可以了解到: index.html---主页,项目入口 App. ...

  4. 【性能测试】:对WebSphere中间件的监控方式

    1  登录WebSphere控制台 2 选择应用.点击启动和停止来启动和停止应用 3 查看当前活动.点击要查看的项目 4 在开始监测前,先选中服务,点击启动监控将集合状态改为活动的 进入页面后,在页面 ...

  5. SPB 公开课记录

    sql server 用工具到处mysql脚本,不过目前有点问题

  6. mix使用本地依赖

    在看elixir程序设计,书中讲到依赖设置,但是都是要联网,自己希望可以下载到本地电脑硬盘,然后项目要使用就用本地的,不要每次都要下载,因为天朝下载真的不稳 官方看到文档 {:deps_name,pa ...

  7. js中window对象详解以及页面跳转

    1.window.top.window.location = "index.asp"; 2.window.top.location.href="index.asp&quo ...

  8. 我和ARM的那些事儿3 beep之旅,最详细的ARM裸机工程设置

    前言 在博客园里面我搜索了老半天,找相应的mini2440的裸机开发的程序,让我挺失望的就是居然没有人对做arm这块做详细的解答,到底如何去做,到底如何去配置,都不清楚,让我很纠结,那么我花了近一星期 ...

  9. 网络IO之阻塞、非阻塞、同步、异步总结【转】

    1.前言 在网络编程中,阻塞.非阻塞.同步.异步经常被提到.unix网络编程第一卷第六章专门讨论五种不同的IO模型,Stevens讲的非常详细,我记得去年看第一遍时候,似懂非懂,没有深入理解.网上有详 ...

  10. IOS Core Image之一

    项目中要实现高斯模糊的效果,今天看了下Core Image这块的内容, 主要包括CIImage.CIFilter.CIContext.CIDetector(检测).CIFeature(特征)等类. 今 ...