In order to set a custom TTL value for forwarded packets from the internal network, follow these steps:
SSH into the router CLI as the root user with the admin password and find the interface name of the WAN interface with the ip command
ip addr show
Test the command below using your WAN interface name and required TTL value, the example below shows interface name wwan0 and setting a TTL of 64
iptables -t mangle -I POSTROUTING -o wwan0 -j TTL --ttl-set 64
If that works for your purposes add it into the rc.local file using the intructions below. If it doesn't work then a reboot will clear it and you can start from fresh and retest.
Assuming you want to keep your new TTL after reboots then add it to the rc.local file. Execute the following command to open rc.local file in a text editor
vi /etc/rc.local
Press "i" button on your keyboard to start editing the file (insert mode).
Insert the line from your tested command e.g. iptables -t mangle -j POSTROUTING -o wwan0 -j TTL --ttl-set X
Press "Esc" button on your keyboard and enter ":w" to save the file, then ":q" to quit
Execute the following command to run the script: sh /etc/rc.local (or reboot)
sh /etc/rc.local
Note: if you want to set a TTL for traffic originating from the router use the --ttl-inc command (instead of --ttl-set)
iptables -t mangle -I POSTROUTING -o wwan0 -j TTL --ttl-inc X