Detailed Guide to Configuring TTL for DNS Records


ATTENTION! According to the latest data from a reliable source, it became known that not only TTL is the reason for blocking the mobile Internet. If you need information on TTL for routers, and what this protocol affects, then see the last chapter.

Good day to all! Most likely you came here to bypass the blocking of your mobile operator. After all, with the help of TTL, these companies catch the hand of subscribers who have enabled access point mode on their phone. What is TTL? Time To Live is the lifetime of a packet in the IP addressing universe.

When the user turns on the modem or access point mode, the phone starts distributing Wi-Fi along with the Internet. When connecting a computer, laptop, TV, set-top box or other phone (tablet), it is through TTL that the provider understands that the Internet is being distributed to another device.

At the moment, such operators as MTS, Beeline, YOTA, Tele2 and others are guilty of this. As far as I remember, only Megafon has no restrictions yet, but I could be wrong - correct me in the comments if I’m wrong. Next, I will tell you how to find out the TTL value, how to change it, and how to bypass the blocking. Let's start with the theory - I advise you to read it so that everything will be clear to you in the future.

TTL concept

On the Internet, everything is transmitted in packets - small pieces of data. They go from router to router (the same as from router to router) across network nodes. For example, your mobile phone can also become a router if it is used to distribute data to a computer and other devices.

TTL stands for Time To Live, that is, the lifetime of a data packet in seconds. As the packet passes through the next router, the TTL decreases by one. This is necessary so that the packet does not endlessly walk around the network if it cannot reach the addressee. A router that encounters a packet that has reached its TTL value sends an ICMP message to the sender stating that the packet has exceeded the maximum allowed time for being on the network. Maximum TTL=255. Moreover, different operating systems generate packets with different TTLs.

To put it in very simple words... Imagine that you are 5 years old and you want to eat (you are a package). You go to dad and say: “Dad, I want to eat.” Your dad watches TV, according to the routing table, and sends you to your mom. You go to her and ask “Mamaaa, I want to eat.” Mom is chatting with a friend on the phone and, according to her routing table, sends you to dad. And so you walk like a fool from dad to mom and back, back and forth, back and forth, and all because crooked admins (parents of mom and dad) configured the routing table incorrectly. To protect against such situations, they came up with the concept of TTL (Time To Live), which in relation to our situation means the amount of patience a boy has until he says “enough” and falls at the feet of his mother or father in a helpless state. The latter, according to the rules (standards are “this is how it is in the family”), is obliged to send a short unflattering review to the address of the one who sent the boy to eat. This is the so-called “boy is dead” ICMP packet.

Ok, so what do operators have to do with it? The fact is that based on the TTL received from the subscriber, the operator knows whether the Internet is available or not.

Changing TTL on Android without and with superuser rights

All multifunction devices based on Android OS can be configured to distribute Internet traffic. This problem can be solved using just one additional program or through the functionality of the gadget itself. It would seem that one tap on the screen - and you share Internet access with friends. But it's not that simple. Mobile operators have found a way to control the clients distributing traffic. And in this post you will learn what TTL is, why you need to change TTL on Android without root rights and how to replace indicators.

What is TTL

Based on the definition, TTL (Time to live) is the so-called lifetime of a data packet directly in the IP protocol. Using this indicator, a mobile operator can easily restrict access to the Internet from equipment to which you have distributed traffic in advance.

It is TTL that is used by operators to determine the unauthorized connection of devices to the public network.

The operating principle of TTL is quite simple. And it can be described using a trivial example with a set constant, that is, with a predetermined indicator of the packet lifetime, which for devices on the Android operating system in most cases is 64. It is with this indicator, TTL = 64, that all packages go to the telecom operator.

As soon as you enable an access point on your phone, data packets change their lifetime value. That is, from your smartphone there is a packet transmission with a TTL value of 64, and from a device that has joined a free access point, packets are transmitted with a TTL value of 63.

Thus, after the data passes directly through the distributing gadget, the indicator loses one unit, and the provider already receives two values ​​from one device.

In what cases should you change TTL?

Using traffic distribution from your smartphone or tablet, you may notice that some gadgets easily join your network, while in the case of others, you immediately receive messages from the operator providing mobile Internet services with warnings about speed limits or new tariffs. The reason for these messages is the different TTL value of the sending and receiving gadget. For example, you decide to distribute the Internet from a phone with TTL=64 to a laptop with TTL=128. For many operators, these values ​​are unacceptable; as a result, they either offer you suitable tariffs or block access to the Internet.

Faced with the above situation, you will naturally be interested in the question of how to change TTL on Android without root, because no one wants to pay for a new package when there are free gigabytes. In such situations, it is better to change the packet lifetime on the receiving device and continue to enjoy access to the Internet, but through a PC. You can also change this indicator on the distribution device, but in this case you need to be careful, since changing the value may subsequently result in restricting access to devices that previously joined your network without problems.

How to check for superuser rights

Changing the TTL value on devices running the Android operating system often requires obtaining superuser rights. To find out whether your device is rooted, it is best to use additional software, which you can download from Google Play for free. The most popular applications that will allow you to quickly determine whether you have superuser rights include Root Checker and Terminal Emulator.

The first program will not cause any difficulties in use - checking for root rights is carried out intuitively. But the second, Terminal Emulator, requires entering the “SU” command in the opened terminal, thanks to which you can easily determine whether you have superuser rights. If the result is positive, the terminal will display the values ​​# or $.

Is it possible to change TTL without root rights?

Changing the TTL value without root rights is possible, but not on all multifunctional gadgets running Android OS. To change TTL on Android without root, just install Terminal Emulator for Android:

  1. Open the application and type the command cat /proc/sys/net/ipv4/ip_default_ttl.
  2. If you have the correct device version, the base TTL value will open. Increase it by 1 and install it on all devices that you would like to join the shared network.
  3. Reboot all equipment and check the result.

It should be noted that this method of changing the TTL value works quite rarely, so if you are faced with traffic or Internet speed restrictions from your provider due to TTL values, take care to obtain root rights.

How to change TTL with root rights

The best way to change the TTL value on the sending or receiving device is to use additional specialized applications. It is noteworthy that all programs of this subtype work exclusively on devices with access granted to the main administrator. Hence, you will need to root your gadget beforehand.

The most popular applications through which changing TTL will not take much time include TTL Master and ES Explorer. Next, you will learn how to replace a value using these simple programs.

Changing TTL using TTL Master

The advantage of the TTL Master program is its simplicity. All you need to do is follow a simple sequence of steps:

  1. Go to Google Play, find the application and install it on the gadget that needs to change the parameter.
  2. When you open the program, you will see the current value of your TTL and the active column where you can change it. Feel free to change.
  3. Reboot your device. After this, you will notice that all speed restrictions and other nuances introduced by the operator have been removed.

Changing TTL using ES conductor

Via ES Explorer, replacing the packet lifetime indicator will take a little longer than through the TTL Master program, but you will achieve the result. You will need:

  1. Switch your smartphone to Airplane mode, thereby disabling all networks on the device.
  2. Launch ES Explorer and find the file on the path proc/sys/net/ipv4/ip_default_ttl
  3. Open the file with any text editor and replace the specified value with the one you need, saving the changes.
  4. Turn off Airplane mode and enable network sharing to other devices.

Bypass restrictions in modem mode (change TTL):

Source: https://v-androide.com/instruktsii/internet/smena-ttl-na-android.html

How do operators know that traffic is being distributed?

Because the subscriber starts receiving packets with different TTL values. There are two reasons for this:

  • Firstly, TTL may be different for different devices. And when distributing the Internet, a second device appears - the one to which we distribute the Internet. So, for a phone on iOS or Android, the TTL value is 64, and for a computer on Windows – 128. And when distributing the Internet from the phone to the computer, two different TTL values ​​will appear: 64 and 128. The operator receives packets with both TTL=64 and TTL= 127 (when sending a packet from a computer through a distributing telephone router, the value 128 is reduced by one).
  • Secondly, even if the TTL of devices is the same (from phone to phone), the distributing phone again reduces the TTL by 1, like any normal router. And the operator receives packets with different values ​​TTL=64 (if it is a packet from a distributing phone) and TTL=63 (a packet from a consuming phone).

So the operator receives packets with different values:

  • TTL of the package from the phone itself.
  • TTL of the packet from the device consuming traffic, reduced by one when passing through the router phone.

I'm attaching pictures just in case.

This is work without the Internet. The phone transmits only packets with TTL=64 to the operator.

And when distributing the Internet, the phone transmits to the operator packets with three different TTL values: 64 from itself, 127 from the computer and 63 from the consuming phone.

The operator notices such a situation of scattering of TTL values, concludes that traffic is being distributed and takes punitive measures against the violating subscriber who wants to profit from unlimited Internet to the fullest, distributing it wherever he wants. How to hide the distribution from the operator? Obviously, we need to equalize the TTL - bring them all to the same value. To do this you can

  1. Or change the TTL on the consuming device,
  2. Or, on the distributing phone, make sure that packets always go to the operator with the same TTL value.

Determining the TTL value in Windows 7

Before starting the main topic of today's material, let's briefly talk about how to check the current Time To Live value of a PC using a standard console command. Now you can do this for informational purposes, and after the change - as a test of the actions performed. The whole process is completed in literally two clicks:

  1. Launch Command Prompt in a way convenient for you, for example, using the Start menu.

In the window that opens, write ping 127.0.1.1 and activate the command by pressing the Enter key. This will start the WAN check procedure and display general information.

Once the traffic testing is complete, several lines will be displayed. The first ones are responsible for exchanging packets, and at the end you will see the TTL designation. This is exactly why such a check was launched.

Now you know what exact TTL value is set in the operating system. After this, you can safely move on to changing the indicator, if necessary.

Changing TTL in Windows 7

Let's move directly to the topic of the article. There is only one way to change the value - by creating a new registry value. Initially, it is simply missing, which means that Time To Live has its standard form. If you create a configuration line yourself and set it to the desired value, the OS will rely on this parameter. There is nothing complicated in implementing these steps, just carefully read the following instructions.

    You will need to launch the Registry Editor, and the easiest way to do this is through the Run utility. Open it using the Win + R hotkey, type regedit in the field and press Enter.

In the window that opens, go to the path HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters.

Here, create the parameter “DWORD (32 bits)” or “QWORD (64 bits)”, based on the OS bit depth.

Be sure to set the name to “DefaultTTL” and press Enter. Then double-click on the created line to open the “Properties” menu.

Select the decimal number system by marking the appropriate item with a marker.

Set the value to 64 and close the window.

Now you can verify that the changes have been applied.

The parameter was successfully created, but the value will only change after a complete network restart or computer reboot. The first method is more difficult to implement, so it is better to simply restart the PC and proceed to check using the method that we recommended at the beginning of the article.

Today you were introduced to the procedure for changing TTL in Windows 7. As you can see, this is done very quickly by creating just one registry entry. Follow the given instructions and you will definitely be able to complete the task without any difficulties.

Thank the author and share the article on social networks.

Casting TTL to a single value to bypass operator restrictions

  • You can bring the TTL to a single value of 63 by changing it on the distributing phone and on the receiving computer. This is a non-committing TTL change.


Changing the TTL of the sending phone and receiving device

  • You can not change anything on the receiving devices, but “force” the distributing phone to always send packets with TTL=63 to the operator, regardless of where they come from: from the distributing phone itself or from the receiving device (computer or phone). This is TTL commit.


TTL fixation
The second scheme is more convenient, but it is not suitable for all phones.

So, we looked at what TTL is and why it needs to be changed. How exactly to change TTL requires consideration in a separate article. How to change TTL on Windows.

How to edit TTL in the Windows Registry

  • The TTL value is edited in the system registry. To edit it, open the registry.
  • To do this, type regedit - registry editor - into the Start menu and run it as an administrator. In Windows 7, you can do this by right-clicking the menu item and selecting “Run as administrator.”

  • The Registry Editor will open. There are a bunch of strange folders used for system needs.
  • We need to open the folder

HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters

  • It specifies the packet parameters, including TTL. You need to create a parameter called DefaultTTL. To do this, right-click in the right pane and select New -> DWORD Value (32-bit).
  • The parameter has been created.
  • Set its value. To do this, double-click and enter the number 65, selecting the decimal number system.

  • Restart your computer.

TTL and DNS caching

What is TTL in the context of DNS? The value tells local servers how long a record should be kept locally before a new copy of the record is restored from DNS. The storage of records is known as a DNS cache, and the act of storing records is called caching.

The term "time to live" is also used to describe the time it takes for a DNS entry to be returned from the cache. In this context, the USB TTL is a numeric value set in the DNS entry on the authoritative DNS server for a domain that determines the number of seconds in which the cache server can provide its value for the entry. When the required number of seconds have passed since the last update, the caching server will contact the server again and get the current (and possibly changed) value to write. Characteristics of the caching process, where TTL:

Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]