Translating iptables rules with TTL, HL and physdev to nftables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 
I am translating iptables and ip6tables rules to nftables rules to set up my portable router. However, the following commands did not translate correctly when I used iptables-translate (ip6tables-translate)
 
iptables -t mangle -A POSTROUTING -o eth0 -j TTL --ttl-inc 1
ip6tables -t mangle -A POSTROUTING -o eth0 -j HL --hl-inc 1
 
iptables -t mangle -I POSTROUTING -m physdev --physdev-out usb0 -j TTL --ttl-inc 1
ip6tables -t mangle -I POSTROUTING -m physdev --physdev-out usb0 -j HL --hl-inc 1
 
For the ttl and hl modules, I tried "ip ttl set 88" and "ip6 hoplimit set 99" on my own, and they worked fine. However, I am unable to increase or decrease ttl (or hoplimit) as --ttl-inc or --ttl-dec.
 
 
The first two rules and the last two rules operate under different conditions and they won't work simultaneously.
System: Debian 11, nftables v0.9.8 (E.D.S.)
 
Can you help me with the correct nftables rules?
Thank you in advance!




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux