Slow connection of Mifi 4G T-Mobile USA via Wifi

This is how I fix it.

In Network–>Firewall–Custom Rules,

Add the line: iptables -t mangle -I POSTROUTING -o 3g-modem -j TTL --ttl-set 64

It shall look like

======================================================================

iptables -t mangle -I POSTROUTING -o 3g-modem -j TTL --ttl-set 64

force_dns() {

lanip=$(ifconfig br-lan |sed -n ‘s/.dr:(.) Bc.*/\1/p’)

iptables -t nat -A PREROUTING -s 0/0 -p udp --dport 53 -j DNAT --to $lanip

iptables -t nat -A PREROUTING -s 0/0 -p tcp --dport 53 -j DNAT --to $lanip

}

force=$(uci get glconfig.general.force_dns)

if [ -n “$force” ]; then

force_dns

fi

======================================================

This shall overrides the ttl of traffic going out through 3g-modem to 64. It makes the carrier (t-mobile for this case) ‘think’ the traffic is from the phone (sim card) itself (as traffic from Android and iPhone has ttl of 64), instead of tethering traffic (Windows etc.)

Hope this can help people in USA.

2 Likes