ISPs messing with TTL

Is your ISP messing with TTL? Is he preventing you from sharing your Internet connection? Does your connection work under Windows and not under Linux ?
This is how you find out.

TTL (Time To Live) is present in any IP packet. It keeps track of how many routers the packet has passed through (i.e. the number of hops). It gets decremented as it passes through each router.
As the TTL is reduced by 1 at every router, its possible to guess that a particular packet corresponds to a request from a NATed computer. The default TTL on Linux boxes is 64. On Windows its 32. Try changing the TTL. Test if your connection still works. Below you will find instructions on how to do this.

Once you have a router between you and your ISP, the TTL of any packet when it reaches the ISP server will be 63 instead of 64 in case of Linux. (31 instead of 32 in case of Windows). Based on this information, packets/connection requests can be accepted/dropped.
So if you are behind a router and your Internet connection doesn't work, try incrementing the TTL by 1.

I've seen ISPs accepting only specific TTL values making their connections usable only under a specific OS(Windows).

Instructions on how to change TTL
Linux

  1. Change Default TTL. This will change the TTL for all interfaces, all packets.
    echo 32 > /proc/sys/net/ipv4/ip_default_ttl
    (Tested with kernel 2.6.XX )

  2. Using iptables, you can have greater control on how TTLs are manipulated. You have to use the MANGLE table.
    iptables -t mangle -A POSTROUTING -o ppp0 -j TTL --ttl-set 32
    if you want to just increment or decrement the value, use –ttl-inc or –ttl-dec instead of –ttl-set.

Windows

To change the Default TTL, make the following registry change
Under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters create a new DWORD called DefaultTTL. Set this value to to the one you need. There are radio buttons allowing to specify the value in either Hex or Decimal.
You have to restart your computer for this setting to take effect

All TTL values mentioned in this document are in Decimal. I suggest trying values 32,64 and 128 or higher. Increment these by 1 if you are behind a router.
If you are having any trouble making these changes, you can reach me on   


Note: This information is for educational purposes only.
This information has been verified by testing it with pppoe connections but it might apply to other forms of Internet connectivity as well.