Help Converting IPTables Rules to nftables rules

Hello All, I have read through lots of posts about converting IPTables rules to NFtables rules and I am just stuck, obviously I am a noob trying to do something that I am not able to even being spoon fed lots of good information!

Could someone please help by converting the following IPTables rules to nftables rules:

iptables -t mangle -I PREROUTING -j TTL --ttl-set 65
iptables -t mangle -I POSTROUTING -j TTL --ttl-set 65
ip6tables -t mangle -I PREROUTING -j HL --hl-set 65
ip6tables -t mangle -I POSTROUTING -j HL --hl-set 65

This is for tethering my iphone. I tried SSH into my router (GL-iNet Flint1) latest firmware and cant get the translate command to work (hence my level of knowledge on all this is very low).

Appreciate the help!

Here’s an nftables solution:

1 Like

Wow, how I did not find these searching I don't know, these seem very close if not exactly what I am looking for. Starting to study these posts. Thanks!

1 Like

Hello All,

I wanted to close the loop in this in case others are trying to do the same. In short this involved creating file firewall.user.in directory /etc adding rules and then also adding an include command in the firewall configuration file in /etc/config

If anyone is interested in more details or the specific code please feel free to message me.

Eric