debian buster / 10 iptables原始TRACE,无日志

如何解决debian buster / 10 iptables原始TRACE,无日志

我有一个新安装的debian buster / 10,我想检查iptables TRACE 日志,所以我添加了iptables的原始TRACE规则:

iptables -t raw -A PREROUTING -j TRACE

然后根据this page进行设置:

modprobe nf_log_ipv4
sysctl net.netfilter.nf_log.2=nf_log_ipv4

但是在syslog,kern.log或消息中仍然没有TRACE日志,-j LOG可以工作。并且“ xtables-monitor -t ”可以显示TRACE软件包。

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

# uname -a
Linux debian 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux

# iptables --version
iptables v1.8.2 (nf_tables)

# lsmod | grep xt_
xt_LOG                 16384  0
xt_TRACE               16384  0
xt_mark                16384  3
xt_TPROXY              16384  2
nf_tproxy_ipv6         16384  1 xt_TPROXY
nf_tproxy_ipv4         16384  1 xt_TPROXY
xt_nat                 16384  5
nf_nat                 36864  2 nf_nat_ipv4,xt_nat
xt_addrtype            16384  2
xt_tcpudp              16384  10
xt_conntrack           16384  3
nf_conntrack          172032  6 xt_conntrack,nf_nat,ipt_MASQUERADE,nf_nat_ipv4,xt_nat,nf_conntrack_netlink
nf_defrag_ipv6         20480  2 nf_conntrack,xt_TPROXY
nf_defrag_ipv4         16384  2 nf_conntrack,xt_TPROXY
x_tables               45056  11 xt_conntrack,nft_compat,xt_TRACE,xt_LOG,xt_tcpudp,xt_addrtype,xt_TPROXY,ip_tables,xt_mark

# lsmod | grep log
nft_log                16384  0
nfnetlink_log          20480  0
nf_log_ipv4            16384  0
nf_log_common          16384  1 nf_log_ipv4
nf_tables             143360  303 nft_chain_route_ipv4,nft_log,nft_chain_nat_ipv4,nft_counter
nfnetlink              16384  5 nft_compat,nf_conntrack_netlink,nf_tables,nfnetlink_log

我错过了什么吗?谢谢。

解决方法

here表示,默认情况下,debian buster使用nftables作为后端:

注意:从Debian Buster开始,iptables被nftable取代

当前状态

注意:Debian Buster默认使用nftables框架。

从Debian Buster开始,nf_tables是以下情况的默认后端 使用iptables,通过iptables-nft层(即 iptables语法和nf_tables内核子系统)。这也是 影响ip6tables,arptables和ebtables。

#debian频道上的

somiaj @ freenode建议使用 nft ,我尝试了一下,它像一种魅力一样工作,规则来自iptables包装器:

    <ul uk-tab>
        <li class="uk-active"><a href=""></a></li>
        <li><a href=""></a></li>
        <li class="uk-disabled"><a></a></li>
    </ul>

nft监视器跟踪

chain OUTPUT {
        type filter hook output priority -300; policy accept;
        meta l4proto udp udp dport 53 counter packets 10526 bytes 658659 nftrace set 1
}

更多信息,请参阅https://wiki.nftables.org/wiki-nftables/index.php/Ruleset_debug/tracing

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res