My script should change the TTL value of all outbound routed packets to 65. I added the suggested lines to add to logger, and to 'touch' to /tmp.
Quick sidenote:
My phone is tethered to the router, so the wan is not receiving access to the internet to set the timestamp, so my router logs July 31, 2015 for however long it takes to get the proper time. Therefore it is totally worthless to help in debugging (if there is something I can do to fix this, let me know).
I SSH into the router with WinSCP, and use the built in interface to write the script.
My script is titled SetTTL65.sh
I ssh into the router with WinSCP
If I manually run it through that software's command line, It will add a log entry, and put the file in the /tmp location.
Another question though, if I run it manually through command line, and ping a connected device, the TTL is 64. This seems to indicate my script doesn't work even if I could get it to run at startup. Anyone have any advice on why the script isn't working?
Any help is greatly appreciated.
Cheers.
Quick sidenote:
My phone is tethered to the router, so the wan is not receiving access to the internet to set the timestamp, so my router logs July 31, 2015 for however long it takes to get the proper time. Therefore it is totally worthless to help in debugging (if there is something I can do to fix this, let me know).
I SSH into the router with WinSCP, and use the built in interface to write the script.
My script is titled SetTTL65.sh
Code:
#!/bin/sh
#Set all outgoing TTL values to 65
logger -t SetTTL65.sh TTL script finished
touch /tmp/SetTTL65.sh.ran
insmod xt_HL
insmod xt_hl
iptables -t mangle -I PREROUTING -i `nvram get wan0_ifname` -j TTL --ttl-set 10
iptables -t mangle -I POSTROUTING -o `nvram get wan0_ifname` -j TTL --ttl-set 64
iptables -t mangle -I POSTROUTING -o `nvram get wan0_ifname` -j TTL --ttl-inc 1
#iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65
I ssh into the router with WinSCP
If I manually run it through that software's command line, It will add a log entry, and put the file in the /tmp location.
Another question though, if I run it manually through command line, and ping a connected device, the TTL is 64. This seems to indicate my script doesn't work even if I could get it to run at startup. Anyone have any advice on why the script isn't working?
Any help is greatly appreciated.
Cheers.