GL-inet AXT1800 version 4.5.0 iptables dont have module to set TTL to 65

Hi,

Im using AXT1800 with firmware version 4.5.0

I want to set TTL to 65 with iptables command though, it throw an error:

root@GL-AXT1800:~# iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65
iptables v1.8.7 (legacy): unknown option "--ttl-set"

And I have to install package iptables-mod-extra and I try again with following command, iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65 and sudden the router hang and not resposive.

Even I try re-plug the power to restart the router and somehow it just crash and I’ve to manually RESET the router.

Any thoughts?

Thanks

I’m not sure if this is a bug of the firmware or that your build is using nftables :smile:

on the OpenWrt forums i see people talk about package iptables-mod-ipopt, this could also be part of package iptables-mod-extra.

But there is also a nftables command, though if your iptables command worked before its strange it would result in a softbrick.

One thing i also would think of is setting a outgoing interface in the iptables rule i believe -o does that, i think that alone gives more abstraction over the interface the ttl gets applied to, than having a probability the ttl gets applied to other interfaces (reminds me of the default gateway checkbox in luci).

As for now the only thing i can recommend is following the debricking guide:

1 Like

Hi,

Actually I download from here GL.iNet download center

Date Compiled: 2023-12-23 05:52:37 (UTC+08:00)
SHA256: ab7cd5631d9d1844569484992f0593ed48340a16548a9ac176733519d60aecd9

Update Just now I flash Dec 23, 2023 snapshot firmware and redo the command and it just work out of the box.
No idea ~

❯ ssh root@192.168.8.1
Warning: Permanently added '192.168.8.1' (ED25519) to the list of known hosts.
root@192.168.8.1's password:
BusyBox v1.33.2 (2023-12-22 21:08:11 UTC) built-in shell (ash)
  _______                     ________ __ ______ __
 |       |.-----.-----.-----.|  |  |  |__|   ___|__|
 |   -   ||  _  |  -__|     ||  |  |  |  |   ___|  |
 |_______||   __|_____|__|__||________|__|__|   |__|
          |__| W I R E L E S S   F R E E D O M
 ---------------------------------------------------
 ApNos-989cf5c3-devel
 OpenWrt 21.02-SNAPSHOT, r16399+165-c67509efd7
 ---------------------------------------------------
root@GL-AXT1800:~# iptables -t mangle -I POSTROUTING -j TTL --ttl-set 65
root@GL-AXT1800:~# ip6tables -t mangle -I POSTROUTING -j HL --hl-set 65

Note:
I remember I installed package iptables-mod-ipopt and iptables-mod-extra then RESET the router, then upgrade the firmware to Dec, 23 snapshot then it just works. ~

root@GL-AXT1800:~# opkg list-installed | grep "iptables-mod-ipopt" && opkg list-install
ed | grep "iptables-mod-extra"
iptables-mod-ipopt - 1.8.7-1
iptables-mod-extra - 1.8.7-1

2 Likes