To execute all commands, you must have the privileges to run the system administrative commands.
First, check if IPV6 is enabled on your Debian system or not. Open the terminal by typing the “terminal” in the search bar, and then click on the displaying Terminal icon in search results. Use the following command to check your IP address:
The following result will show on your terminal to determine if IPV6 is enabled.
Disable IPV6 through systemctl:
Using the following three commands input, you can disable the IPV6 on your system:
$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
After running the above commands, the IPV6 services will be disabled on your Debian system, but this is only a temporary solution. When you restart your system, it will enable it again. Verify the status by typing the “ip a” command.
To disable these IPV6 connections, you need to use /etc/sysctl.conf file. Open this configuration file in any available editor. Here, we are using a nano editor for modifying this file, as shown in the command below:
Now, paste the following lines in this file and save it:
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
Paste the below-mentioned line, if you have any specific network interface adopter such as “enp0s3”:
To verify the change settings, type the following command:
Method 1: Using sysctl.d directory
Create file in the /etc/sysctl.d directory using the following command:
Paste the following line in this file:
Save and press ‘Ctrl +X’ to exit from this window.
Now, check the effect of the changes using the following command:
Run the following command to verify the results:
As you can see in the above output, IPV6 connections have been disabled on this system.
Conclusion
We have provided you the brief information about how you can disable the IPv6 interface on your Debian 10 system. All these commands can also be executed on the Ubuntu system. If you find this article useful, then let us know with your feedback.
from Linux Hint https://ift.tt/3e5cjZE
0 Comments