How to change TTL on Manjaro (Linux)

This is my first article in my blog and it will be about changing the value of TTL on Manjaro Linux. But I think that this method is suitable for most Linux distributions (Ubuntu, Debian, and so on). Also I wanted to say that I'm not native speaker, and if you find some grammar mistakes, please don't pay attention to it or write about it in comments. Let's get started.



Suppose we need to change the actual TTL to 65.
Open the terminal (Ctrl + Alt + T) , and one by one we enter commands:

sudo -s
echo "net.ipv4.ip_default_ttl=65" >> /etc/sysctl.d/sysctl.conf


If you didn't get an error, restart the computer. If you get an error: no such file or directory. Then you need to create this file. By using this commands you can create a file and write there an information about TTL.

sudo -s
touch /etc/sysctl.d/net.conf
echo "net.ipv4.ip_default_ttl=65" >> /etc/sysctl.d/net.conf


Next, restart the computer and get the required TTL. You can check the result with the command:

ping 127.0.0.1




If you are unable to achieve the result, please write in the comments and I will try to help.

Tags

Comments