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. sql geography类型(地理坐标) 赋值

    sql 语句赋值 update [lishui].[dbo].[t_NearbyService] ,, ) ,[locationbaidu]=geography::Point(,, ) where [ ...

  2. Windows Server 2008 R2 Enterprise 上用 SqlServer 2008 R2 创建发布出现异常

    标题: 新建发布向导------------------------------ SQL Server 无法将“AC”配置为分发服务器. ------------------------------其 ...

  3. Asp.NET MVC 拍卖网站,拆解【1】预览与目录

    本人最近带创业团队基本做完了一个艺术品拍卖的外包项目,分为网站前台(asp.net mvc5),网站管理员管理的后台使用的9900端口(asp.net mvc5),监听拍卖状态的windows服务,为 ...

  4. 2-9 js基础 cookie封装

    // JavaScript Document 'use strict'; function setCookie(sName,sValue,iDay){ if(iDay){ var oDate = ne ...

  5. MYSQL数据库的参数文件

    参数文件:告诉MySQL实例启动时在哪里可以找到数据库文件,并且指定某些初始化参数,这些参数定义了某种内存结构的大小等设置,还会介绍各种参数的类型. 参数文件 当MySQL实例启动时,MySQL会先去 ...

  6. 剑指offer(11-20)编程题

    二进制中1的个数 数值的整数次方 调整数组顺序使奇数位于偶数前面 链表中倒数第k个结点 反转链表 合并两个排序的链表 树的子结构 二叉树的镜像 顺时针打印矩阵 包含min函数的栈 11.输入一个整数, ...

  7. Entity Framework 6.0 Code First(转)

    源自:http://www.cnblogs.com/panchunting/tag/Code%20First/ 1 Conventions 2 Custom Conventions 3 Data An ...

  8. MTCNN 实现人脸识别

    MTCNN(Multi-task CNN) MTCNN难点 WIDER FACE等数据集为我们提供的图片并不是MTCNN支持的训练样本, 需要通过几个脚本将其转为MTCNN可以接受的数据集, 这些脚本 ...

  9. ORCLE报错解决(ora-01747:无效的用户.表.列,表.列)

    原因: 这个问题出现是因为表中存在关键字造成.

  10. java调用C++代码

    一.在要使用到C++代码的类文件中声明一个native方法,例如: public class TestNative{ public native void test(); } 二.javac编译此ja ...