NF_STOLEN 패킷에 대한 응답이 NAT 규칙을 준수하지 않습니다.

NF_STOLEN 패킷에 대한 응답이 NAT 규칙을 준수하지 않습니다.

현재 Docker 브리지 네트워크에 DHCP 서버를 배치하는 중입니다. 패킷이 통과하는지 확인하기 위해 다음이 필요합니다.

table netdev filterearly_lan10{
    chain ingress {
        type filter hook ingress device enp1s0.10 priority -500; policy accept;
    
            meta nftrace set 1
            ether daddr ff:ff:ff:ff:ff:ff udp sport 68 fwd to "br-a039f83f0bc5";            
    }

다음 을 사용하여 nft monitor trace첫 번째 패킷을 볼 수 있습니다 .

trace id e0907bbc netdev filterearly_lan10 ingress packet: iif "enp1s0.10" ether saddr 08:00:27:65:d0:37 ether daddr ff:ff:ff:ff:ff:ff vlan pcp 0 vlan dei 0 vlan id 10 ip saddr 0.0.0.0 ip daddr 255.255.255.255 ip dscp 0x04 ip ecn not-ect ip ttl 128 ip id 0 ip protocol udp ip length 328 udp sport 68 udp dport 67 udp length 308 @th,64,96 0x1010600e7f4d81b000d0000
trace id e0907bbc netdev filterearly_lan10 ingress rule meta nftrace set 1 (verdict continue)
trace id e0907bbc netdev filterearly_lan10 ingress rule ether daddr ff:ff:ff:ff:ff:ff udp sport 68 fwd to "br-a039f83f0bc5" (verdict stolen)

이에 다음과 같은 응답이 이어졌습니다.

trace id a119cb52 inet filter forward packet: iif "br-a039f83f0bc5" oif "enp1s0.10" ether saddr 02:42:ac:19:0a:05 ether daddr 02:42:29:21:39:06 ip saddr 172.25.10.5 ip daddr 192.168.1.134 ip dscp cs6 ip ecn not-ect ip ttl 63 ip id 38372 ip protocol udp ip length 328 udp sport 67 udp dport 68 udp length 308 @th,64,96 0x2010600e7f4d81b000d0000
trace id a119cb52 inet filter forward rule meta nftrace set 1 (verdict continue)
trace id a119cb52 inet filter forward verdict continue
trace id a119cb52 inet filter forward policy accept
trace id a119cb52 inet customblock block packet: iif "br-a039f83f0bc5" oif "enp1s0.10" ether saddr 02:42:ac:19:0a:05 ether daddr 02:42:29:21:39:06 ip saddr 172.25.10.5 ip daddr 192.168.1.134 ip dscp cs6 ip ecn not-ect ip ttl 63 ip id 38372 ip protocol udp ip length 328 udp sport 67 udp dport 68 udp length 308 @th,64,96 0x2010600e7f4d81b000d0000
trace id a119cb52 inet customblock block verdict continue
trace id a119cb52 inet customblock block policy accept

그러나 이는 응답 패킷이 얻는 범위일 뿐이며 응답 패킷의 IP를 스푸핑하는 데 필요한 NAT 체인에 도달하지 않습니다. 에서는 볼 수 있지만 tcpdump -i br-a039f83f0bc5 port 67 and port 68 or arp -nne에서는 볼 수 없습니다 tcpdump -i enp1s0.10 -nn port 67 or port 68.

정보로서 내 postrouting것은 다음과 같습니다.

    chain postrouting {
        type nat hook postrouting priority 100; policy accept;
        
        meta nftrace set 1
        iifname "br-a039f83f0bc5" oifname "enp1s0.10" masquerade;
        oifname "ppp0" masquerade;

    }

이것netfilter 문서상태:

  1. NF_STOLEN: 패킷을 인계받았으며 계속해서 탐색하지 않습니다.

이것이 응답 패킷에도 영향을 미칠지 궁금합니다.

응답 패킷이 평소처럼 넷필터를 통과하도록 하려면 어떻게 해야 합니까? 감사해요

관련 정보