linux命令(216)——iptables-save命令(代码片段)

恋喵大鲤鱼 恋喵大鲤鱼     2023-01-06     359

关键词:

文章目录

1.命令简介

iptables-save/ip6tables-save 转储 iptables 规则。

iptables-save 和 ip6tables-save 用于转储 IP 或 IPv6 表在容易解析的格式或 STDOUT 或到指定的文件。

iptables/ip6tables 均是 xtables-multi 的软链。

2.命令格式

iptables-save [-M modprobe] [-c] [-t table] [-f filename]

3.选项说明

-M, --modprobe <modprobe_program>
	指定 modprobe 程序的路径。默认情况下,iptables-save 将检查 /proc/sys/kernel/modprobe 以确定可执行文件的路径。
-f, --file <filename>
	指定要记录输出到的文件名。如果没有指定,将输出到 STDOUT。
-c, --counters
	在输出中包含所有数据包和字节计数器的当前值。
-t, --table <tablename>
	将输出限制为一个表。如果内核配置了自动模块加载,如果该表不存在,则会尝试为该表加载相应的模块。

	如果未指定,输出所有可用的表。

4.常用示例

(1)指定要保存的表的名称。

iptables-save  -t filter > filter.bak

(2)保存当前的数据包计算器和字节计数器的值。

iptables-save -c
# Generated by iptables-save v1.4.21 on Sat Dec 17 17:05:12 2022
*filter
:INPUT ACCEPT [8397115:1774409253]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [8446458:1291918085]
COMMIT
# Completed on Sat Dec 17 17:05:12 2022

参考文献

iptables-save(8) - Linux manual page - man7.org

linux命令(216)——iptables-save命令(代码片段)

文章目录1.命令简介2.命令格式3.选项说明4.常用示例参考文献1.命令简介iptables-save/ip6tables-save转储iptables规则。iptables-save和ip6tables-save用于转储IP或IPv6表在容易解析的格式或STDOUT或到指定的文件。iptables/ip6tables均是xtables-multi的软... 查看详情

ftp上传“建立数据socket失败”是怎么回事?

...消息... 220welcometoftpserver...状态:> 已连接,正在验证...命令:> USERshipeng 331Usernameokay,needpassword.命令:> PASS******** 230Userloggedin,proceed.状态:> 登录成功命令:> TYPEI 200TypesettoI.状态:> 该站点支持断点续传命令:> PWD 257"/&quo... 查看详情

linux之unzip命令(代码片段)

命令概述unzip-列出、测试和提取ZIP存档中的压缩文件;命令语法unzip[-Z][-cflptTuvz[abjnoqsCDKLMUVWX$/:^]]file[.zip][file(s)...][-xxfile(s)...][-dexdir]命令参数-f更新压缩包的文件;-l显示压缩文件内的文件;-v执行时显示详细的信息... 查看详情

docker命令(代码片段)

1.进入docker容器dockerpssudodockerexec-it216da717b457/bin/bash  查看详情

windowsazure区域可以选国外吗

参考技术A第一步我们先创建一个地缘组Ø在门户中点击右下角的设置Ø在随后出现的页面中的工具栏里点击地缘组选项Ø点击下方的添加按钮,新建地缘组。Ø输入名称、说明信息及指定地区(中国的Azure可以选择东部... 查看详情

leetcode题解:l216/combinationsumiii

L216:CombinationSumIII  Findallpossiblecombinationsofknumbersthatadduptoanumbern,giventhatonlynumbersfrom1to9canbeusedandeachcombinationshouldbeauniquesetofnumbers.Ensurethatnumberswithinthesetaresort 查看详情

javareadfrom(1-216:57)(代码片段)

查看详情

216.combinationsumiiijavasolutions

Findallpossiblecombinationsof k numbersthatadduptoanumber n,giventhatonlynumbersfrom1to9canbeusedandeachcombinationshouldbeauniquesetofnumbers.Example1:Input: k =3, n&nbs 查看详情

216.combinationsumiii

Findallpossiblecombinationsof k numbersthatadduptoanumber n,giventhatonlynumbersfrom1to9canbeusedandeachcombinationshouldbeauniquesetofnumbers.Example1:Input: k =3, n&nbs 查看详情

kvm之二:kvm工具简介一:virt-manager,virt-viewer,virt-convert,qemu-img

...行操作。该工具还可以管理各种存储以及网络方面。Ø命令用法:lvirt-viewer介绍:virt-viewer是一个最小化的虚拟机图形界面展示工具,支持VNC和SPICE两种远程协议。virt-viewer使用十分简单。Ø命令用法:lvirt-convert介绍:virt-con... 查看详情

cse216–homework

CSE216–HomeworkIThishomeworkdocumentconsistsof3pages.Carefullyreadtheentiredocumentbeforeyoustartcoding.Note:Allfunctions,unlessotherwisespecified,shouldbepolymorphic(i.e.,theyshouldworkwithanydatatype).Forexample,ifyouarewritingamethodthatshouldworkforlists,thetypemustbe‘alist,andnotintlist... 查看详情

a是216b是135勾股定理求c怎么算?

两种情况一种是216的平方加上135的平方再开方,一种是216的平方减去135的平方再开方,也就是说一种c是斜边,一种c是直角边参考技术Ac=√(a²+b²)=√(216²+135²)=254.7 查看详情

leetcode216.combinationsumiii

Problem: https://leetcode.com/problems/combination-sum-iii/Findallpossiblecombinationsof k numbersthatadduptoanumber n,giventhatonlynumbersfrom1to9canbeusedandeachcombinationshould 查看详情

java216.组合sumiii.java(代码片段)

查看详情

java216.组合sumiii.java(代码片段)

查看详情

java216.组合sumiii.java(代码片段)

查看详情

java216.组合sumiii.java(代码片段)

查看详情

java216.组合sumiii.java(代码片段)

查看详情