linux命令(217)——iptables-restore命令(代码片段)

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

关键词:

文章目录

1.命令简介

iptables-restore 恢复 IP 表。

ip6tables-restore 恢复 IPv6 表。

iptables-restore 和 ip6tables-restore 用于从 STDIN 或文件中指定的数据恢复 IP 和 IPv6 表。

iptables-restore 和 ip6tables-restore 均是 xtables-multi 的软链。

2.命令格式

iptables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]

3.选项说明

-c, --counters
	指定在还原 iptables 表时候,还原当前的数据包计数器和字节计数器的值。
-h, --help
	打印一个简短的选项摘要。
-n, --noflush
	不要刷新表的先前内容。如果没有指定,这两个命令将刷新(删除)各自表的所有先前内容。
-t, --test
	只解析和构造规则集,但不提交它。
-v, --verbose
	在规则集处理期间打印额外的调试信息。
-V, --version
	打印程序版本号。
-w, --wait [seconds]
	等待 xtables 锁。为了防止程序的多个实例并发运行,将尝试在启动时获得排他锁。默认情况下,如果无法获得锁,程序将退出。此选项将使程序等待(无限期或可选的几秒),直到获得独占锁。
-W, --wait-interval <microseconds>
	每次迭代等待的间隔。当运行对延迟敏感的应用程序时,等待 xtables 锁的时间可能是不可接受的。该选项将使每次迭代花费指定的时间。缺省值为1秒。此选项仅和 -w 一起使用。
-M,--modprobe <modprobe_program>
	指定 modprobe 程序的路径。默认情况下,iptables-restore 将检查 /proc/sys/kernel/modprobe 以确定可执行文件的路径。
-T, --table <name>
	指定要还原表的名称。

4.常用示例

(1)还原 iptables 配置。

iptables-restore < iptables.bak

(2)指定在还原 iptables 表时候,还原当前的数据包计数器和字节计数器的值。

iptables-restore -c < iptables.bak

(3)指定要还原表的名称。

iptables-restore -T filter < filter.bak

参考文献

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

linux命令(187)——atrm命令(代码片段)

文章目录1.命令简介2.命令格式3.选项说明4.常用示例参考文献1.命令简介atrm根据任务编号删除待执行任务。atrm是at的软链,相当于at-d。2.命令格式atrm[-V]job[job...]3.选项说明-V 显示版本号。4.常用示例使用atq查看当前的定时任务... 查看详情

地图瓦片png8格式理解

...构:band=gdal.Open(filepath).GetRasterBand(1)band.ReadAsArray()array([[217,217,217,...,217,217,217],[217,217,217,...,217,217,217],[217,217,217,...,217,217,217],...,[243,146,78,...,217,217,217],[238,86,32,...,217,217,217],[166,78,0,...,217,217,217]],dtype=uint8)len(band.ReadAsArray())Out[161]:256... 查看详情

xargs

find命令与xargs阅读(217)一:find查找文件,xargs把find查找到的结果当做输入进行下一步的具体操作#另外find可以可exec结合执行命令,但是exec是要等find命令执行完成之后才对find执行完成的结果进行操作,然而很不幸的是当文件太多... 查看详情

pythonpandas对每列求和时少了一列

命令如下:df=pd.read_excel('top8.xlsx')df显示如下abcdefgcustomproduct0429.6019.8732.217.1293127.7520429.6111429.6019.8732.217.1293127.7520429.6122214.8019.8716.117.1293113.8810214.81131,074.0019.8780.517.1293169.39501074.0124214.8019.8716.117.1293113.8810214.8215429.6019.8732.217.12... 查看详情

linux查看磁盘是ssd还是hdd

...可能有别的块设备,它们都会干扰你的判断。2、使用lsblk命令进行判断,参数-d表示显示设备名称,参数-o表示仅显示特定的列。参考技术ALinuxSSD是非转动磁盘,Linux可以通过读sysfs:cat/sys/block/sda/queue/rotational返回0,就是SSD。Windows... 查看详情

217.containsduplicateeasy

217.ContainsDuplicate【easy】Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct 查看详情

0.5linux的联通性命令汇总

linux下网络端口连通性测试命令汇总一、telnetipport1.1 安装:安装telnet服务【centos、ubuntu】安装telnet命令的方法.】yumlisttelnet*列出telnet相关的安装包yuminstalltelnet-server安装telnet服务yuminstalltelnet.*安装telnet客户端1.2简介telnet命令... 查看详情

217.containsduplicate

problem217.ContainsDuplicate    参考1.Leetcode_ContainsDuplicate;完 查看详情

pythonpandas对分组并对每列求和时少了一列

命令如下:df=pd.read_excel('top8.xlsx')df显示如下abcdefgcustomproduct0429.6019.8732.217.1293127.7520429.6111429.6019.8732.217.1293127.7520429.6122214.8019.8716.117.1293113.8810214.81131,074.0019.8780.517.1293169.39501074.0124214.8019.8716.117.1293113.8810214.8215429.6019.8732.217.12... 查看详情

leetcode217containsduplicate

Problem:Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct.Summary:判断数组中是否出现重 查看详情

处理accountlockeddueto217failedlogins的问题

处理Accountlockeddueto217failedlogins的问题[[email protected]~]#scp123.txt[email protected]地址:/rootAccountlockeddueto213failedloginsAccountlockeddueto215failedloginsAccountlockeddueto217failedlog 查看详情

217.containsduplicate

Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct.给定整数数组,查找数组是否包含任何重复项。如果数组中 查看详情

217.containsduplicate

Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct.此题很简单,直接上代码:p.p1{margin:0. 查看详情

217.containsduplicate

Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct. 解题思路:用散列是可以的,这里用set熟 查看详情

217.containsduplicate

Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct.书看的头疼,上来刷两道。加州的破网也是无力吐槽,家里 查看详情

leetcode第217题containsduplicate

题目:‘‘‘Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthearray,anditshouldreturnfalseifeveryelementisdistinct.Subscribetoseewhichc 查看详情

用 Linux 编写的带有 GUI 的 Windows 数据库应用程序

】用Linux编写的带有GUI的Windows数据库应用程序【英文标题】:implementadatabaseapplicationwithGUIforWindows,writtenwithLinux【发布时间】:2011-05-0415:13:01【问题描述】:我想将以下数据方案转换为应用程序。常规的桌面GUI可能是最好的。UMLDia... 查看详情

fiscobcos搭建多机区块链网络(代码片段)

...件生成区块链节点配置bashbuild_chain.sh-fipconf-p30300,20200,8545命令执行成功会输出All completed。如果执行出错,请检查nodes/build.log文件中的错误信息。至此,成功生成了多机4节点配置,每台机器的区块链节点配置均位于node... 查看详情