- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
从我的发行版的手册页中,我对下面的粗体部分特别感兴趣。
-j, --跳转目标
This specifies the target of the rule; i.e., what to do if the packet matches it. The target can be a user-defined chain (other than the one this rule is in), one of the special builtin targets which decide the fate of the packet immediately, or an extension (see EXTENSIONS below). If this option is omitted in a rule (and -g is not used), then matching the rule will have no effect on the packet's fate, but the counters on the rule will be incremented.
-g, --goto 链
This specifies that the processing should continue in a user specified chain. Unlike the --jump option return will not continue processing in this chain but instead in the chain that called us via --jump.
我担心我误解了 -g
的实际作用。
-g
现在与 -j
究竟有何不同?
最佳答案
当当前链中的匹配规则指定目标RETURN
时,或者到达当前链的末尾时,将在跳转到当前链的前一个链中继续处理,从下一条尚未处理的规则,即实际指定当前链作为其目标并触发跳转到当前链的规则下面的规则。
但是,如果跳转到当前链是通过 -g
(而不是通过 -j
)完成的,则处理不会在前一个链中继续,而是在之前的链,假设那里的跳转是用 -j
完成的。如果情况并非如此(即,即使使用了 -g
),那么也会考虑之前的链,依此类推。换句话说,接下来将处理实际使用 -j
(而不是使用 -g
)指定下一个链的最新链。
如果没有找到这样的链(即所有链直到并包括指定的-g
内置链),或者到达了内置链的末尾或者到达了一个规则内置链与目标RETURN
匹配,内置链策略指定的目标决定数据包的命运。
关于linux - iptables -j 与 -g 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31606411/
我已经为启用了完整 netfilter 功能的 android 模拟器编译了 Linux。从源代码构建 android 后得到一个 iptables 二进制文件。 当我将这个二进制文件推送到模拟器时
由于大量机器人每秒访问我的 Web 服务器太多次,我进入我的服务器并发出以下命令,试图在 5 秒内将连接限制为最多 25 个。我可能需要更严格,但我不是因为我有一个很少访问的页面,它请求 50 个图像
我正在尝试阻止在短时间内打开大量连接的网络机器人。我正在使用这个语法: -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --set
我正在尝试在 iptables 中记录一些来自恶意 IP 地址的丢弃数据包,这些 IP 地址不断攻击我的服务器。 来自这个恶意 IP 的所有内容都被丢弃,我不再在 Web 服务器日志中看到它,这是一件
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我已经设置了 keepalived,只有当我停止 iptables 服务时它才能正常工作。我的iptables配置是这样的,请告诉我应该为keepalived添加什么规则 # Firewall con
我使用 DevStack 在 RHEL6 上安装了 OpenStack,并且运行良好。有一天,我们的一位“系统管理员”注意到 iptables 正在系统上运行,并决定将其关闭(chkconfig ip
测试环境为: 2 操作系统 ubuntu server 10.04 安装在 VirtualBox 上 iptables v1.4.4 已加载 ip_conntrack 模块 这些是我的测试规则:
当我清除 IPtables 然后添加以下规则时,传入连接可以毫无问题地连接到端口 1234 上的我的 KVM VM。 -A PREROUTING -i br0 -p tcp -m tcp --dpor
我正在为我的工作使用 iptables 最近的匹配项,因为它保存了 ip 地址和我需要的最后一次看到的值。 但是现在我需要从 iptables 最近的列表中删除一些条目,这些条目位于 ipset 中。
所以我加了 sudo iptables -t raw -A PREROUTING -p tcp --dport 25 -j TRACE 也 sudo iptables -t raw -A OUTPUT
我在专用的 ubuntu 服务器上有一个防火墙(基于 iptables)。我有几个 LAN 客户端。 在我的一个 LAN 客户端上,我正在运行可以根据 IP 限制访问的软件。对我来说,重要的是我可以通
我不知道如何解决我的问题。 是否可以使用 ipq_set_verdict() 重定向捕获的数据包? 我想将未经授权的用户重定向到登录页面。 请看我的代码: 数据包被接受,我的浏览器打开请求的页面(未更
我正在尝试使用字符串匹配模块获取“from”和“to”偏移量以在我的 iptables 规则中使用。这是我从 tcpdump 工具输出的数据包: listening on eth0, link-typ
我正在尝试使用 python-iptables 编写脚本来设置某些规则。我弄清楚了如何设置规则以允许所有连接和拒绝所有连接,但我需要弄清楚如何编写规则以允许已建立的连接。 例如,我需要使用 pytho
这是规则集: #!/bin/sh iptables-restore -v<
我正在尝试将数据从 xml 加载到 iptables。我正在使用以下命令: xsltproc /usr/share/iptables/iptables.xslt myiptable.xml | ipt
我正在尝试设置 iptable 规则,但在使用 iptable 时收到以下错误消息: iptables v1.4.14: can't initialize iptables table `nat':
我正在从 Windows Bash 运行 Ubuntu 18.04: uname -a Linux DESKTOP-M87DGAS 4.4.0-17134-Microsoft #112-Microso
有一个 IP(来自中国)试图下载我的整个网站。它下载我所有的页面并显着加载服务器(我有超过 500 000 个页面)。查看访问日志,我可以看出它绝对不是 Google 机器人或任何其他搜索引擎机器人。
我是一名优秀的程序员,十分优秀!