Good afternoon, dear blog readers, today I want to ask you, can you use the ping command to determine which device or operating system is responding to you? If not, then you have come to the right place and I will tell you another purpose of the ping utility. I think this material will be useful for both beginners and advanced users, especially when you are looking for the cause of a malfunction in a network or service, I have seen many times that you think that one server is answering you, but in fact it is another, because someone , I changed something and didn’t document it.
Installing ttl on linux
Category: Manuals / Added by: Artem
Most modern mobile operators, such as MTS and Yota, provide tariffs that allow you to use the Internet without traffic restrictions. Everything seems to be good and convenient. But if we consider this issue in more detail, then everything will not be so good.
Initially, the terms of the tariff are as follows: you can use the Internet at any time of the day and without traffic restrictions, but for distributing an Internet connection via Wi-Fi, USB modem or Bluetooth, you will be charged a subscription fee of N rubles.
PS: I use the services of the MTS operator, and for distributing the Internet they used to charge 30 rubles per day, but now they charge 50 rubles.
But what if you need to distribute the Internet via Wi-Fi, but there is no extra money on your balance? Everything is very simple! you need to fix the TTL value of the file to a certain value in the operating system: Linux, Windows or Mac OS.
PSS: this article is for informational purposes only; I do not encourage anyone to use this information for practical purposes.
Changing TTL value in Ubuntu operating system
To bypass the restriction on distributing the Internet through your phone to a computer with Ubuntu on board, if your operator is Iota, you must do a few simple things.
1. Open the terminal using the key combination Ctrl + Alt + T.
2. Enter the following command from the super user:
3. The system will require you to enter a password for the administrator account, enter it and press Enter. Next, press the i button - this will tell the vi editor to go into editing mode.
4. Now we must enter a script taking into account the features of the operating system of your smartphone. If you have Andro >
Why is the value 1 greater? It's very simple, the TTL value on the computer should be 1 greater than the TTL value on the phone from which you are distributing.
Script to bypass internet sharing restrictions for Android and iOS:
Script to bypass restrictions on Internet distribution for Windows Phone:
5. To complete editing, press Esc. Then save the changes made by pressing the keys: Shift + ZZ (press Z twice).
6. Assign the script permissions to run:
7. Add the script to autorun:
All is ready! We successfully fixed the TTL value in the Ubuntu operating system, and bypassed the restriction of mobile operators: MTS and Yota, on distributing an Internet connection via Wi-Fi, USB modem and Bluetooth.
source
TTL value
Earlier I told you about the OSI model, and there a network packet has such a TTL (Time To Life) value, if translated, this is the lifetime of the packet. TTL is a kind of counter that decreases by one when a network packet or, as it is also called, a frame passes through a router; this is done so that, if it is impossible to find a destination, it does not constantly run around routers, creating load and spurious traffic.
It is the packet lifetime (TTL) that will help us determine who is on the other side. Each operating system has its own indicator, for example
- Cisco TTL > equal to 255
- ttl windows > equal to 128
- Unix ttl > equal to 64
- Android and IOS Apple>65
- Lumia > 130
As you can see, it’s different for everyone, and let’s figure it out, for example, I’ll ping a Cisco switch, for this we open the Windows command line, you may also have Linux.
We write ping 10.152.1.1 (you may have a different address)
As you can see, the ttl value here is 255, which shows that the IOS of the Cisco device is responding to you, as you can see, the ping command perfectly recognized the host operating system on the other side.
Let's try to ping a Unix system, for example, on my local network, the gateway is Kerio Control, on the Linux version. Let's ping.
We write ping 192.168.5.1 (you may have a different address)
As you can see here, the ttl value is 64, which means a unix platform, so various D-link devices and other home routers can respond.
Let's also check the Windows platforms, for example, I have Windows 8.1 on the local network, let's do a ping. And you see that it is equal to 128, just like I said.
There you are. then the mystery is, we ping Windows Server 2012 R2, it has a website relay.aetp.ru. What do you see, the ttl value is 120, but in Windows 128 is the default, it doesn’t fit