Steps to enable TTL modification on Franklin T9:
- Read this blog
- Based on the blog, enable SSH.
- Once SSH is enabled, place this file in
/etc/init.d/set_ttl
:
#!/bin/bash
### BEGIN INIT INFO
# Provides: ttl
# Required-Start: $remote_fs $syslog $networking
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Set TTL in iptables
### END INIT INFO
TTL=66
INTERFACE=rmnet_data0
case "$1" in
start)
echo "Setting TTL on $INTERFACE to $TTL..."
ip6tables -t mangle -I POSTROUTING -o $INTERFACE -j HL --hl-set $TTL
ip6tables -t mangle -I PREROUTING -i $INTERFACE -j HL --hl-set $TTL
iptables -t mangle -I POSTROUTING -o $INTERFACE -j TTL --ttl-set $TTL
iptables -t mangle -I PREROUTING -i $INTERFACE -j TTL --ttl-set $TTL
;;
*)
echo "$1 is not implemented"
;;
esac
exit 0
- Adjust
TTL
to the value you desire chmod 755 /etc/init.d/set_ttl
cd /etc/rc5.d/; ln -s ../init.d/set_ttl S99set_ttl
reboot
If you upgrade firmware, this will need to be redone.
on firmware 891,
ifconfig
doesn't showrmnet_data0
but ratherrmnet0
, and when I tried pasting in the comment you made on snt.sh, neither the iptable nor ip6tables commands work (I get an error message telling me to check the syntax in the help info, i.e. -h). Should I change my adapter interface tormnet0
or isrmnet_data0
correct (I'm not an iptables wiz)?Edit: after playing with various options, I found
rmnet_data0
did work. Here's what I finally ended up with:~ # cat /etc/rc5.d/S99set_ttl