Working Nftables Rule for TTL in 22.03

Perfect, that's what I needed to know. When I log into the router and run the above command, I show a TTL of 65 for traffic moving from my router address to the gateway address, which is what I wanted to confirm.

Thanks! Here's the rule that seems to be working for me:

chain mangle_postrouting_ttl65 {
  type filter hook postrouting priority 300; policy accept;
  oifname "eth2" counter ip ttl set 65
}

chain mangle_prerouting_ttl65 {
  type filter hook prerouting priority 300; policy accept;
  iifname "eth2" counter ip ttl set 65
}
1 Like