Cara Fix TTL di Openwrt

Network > Firewall > Custom Rules

double klik untuk salin
ip6tables -t mangle -I POSTROUTING -j HL --hl-set 65 ip6tables -t mangle -I PREROUTING -j HL --hl-set 65 iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65 iptables -t mangle -I PREROUTING -j TTL --ttl-set 65

Setelah itu tinggal restart firewall, di menu System > Startup > Restart Firewall.

firewall4 menggunakan nftable. Cara setting ttl di OpenWrt kita membuat file baru 11-ttl.nft di direktori /etc/nftables.d/.


double klik untuk salin
cat << 'EOF' > /etc/nftables.d/11-ttl.nft chain mangle_postrouting_ttl65 { type filter hook postrouting priority 300; policy accept; counter ip ttl set 65 } chain mangle_prerouting_ttl65 { type filter hook prerouting priority 300; policy accept; counter ip ttl set 65 } EOF

Jika nilai ttl berbeda, silakan edit nilai 65 dengan nilai TTL yang kalian inginkan. Jika sudah maka tinggal restart firewall.

/etc/init.d/firewall restart
 
Atau bisa dengan salin script dan tempel ke terminal openwrt. salin script dibawah ini.
Openwrt versi 21 kebawah (firewall3):

double klik untuk salin
echo "net.ipv4.ip_default_ttl=65" > /etc/sysctl.conf sysctl -p

Openwrt versi 23 keatas (firewall4):

double klik untuk salin
echo "chain mangle_postrouting_ttl65 { type filter hook postrouting priority 300; policy accept; counter ip ttl set 65 } chain mangle_prerouting_ttl65 { type filter hook prerouting priority 300; policy accept; counter ip ttl set 65 }" > /etc/nftables.d/10-custom-filter-chains.nft service firewall restart



Type above and press Enter to search.

Code Copied!