Home  >  Article  >  Operation and Maintenance  >  Can ipv6 be turned off in linux?

Can ipv6 be turned off in linux?

WBOY
WBOYOriginal
2022-06-01 10:29:106901browse

IPv6 can be turned off in Linux. Close method: 1. Use vi editor to open the "/etc/modprobe.conf" file; 2. Add "alias net-pf-10 off" and "alias ipv6 off" to the document, save and exit, and then restart the system. Can.

Can ipv6 be turned off in linux?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

linux turns off ipv6

Under the linux operating system, you can turn on and off ipv6 through relevant commands

1. Linux turns off IPV6 command

1. Use vi editor to open /etc/modprobe.conf

Can ipv6 be turned off in linux?

2. Add the following two lines to the document:

alias net-pf-10 off
alias ipv6 off

Save and exit, and restart the system.

Extended knowledge:

After restarting, you can use the following three methods to verify whether IPv6 support has been turned off.

2. Confirm whether IPv6 is enabled

Confirming whether IPv6 has been enabled under Linux can be determined from three aspects.

1. Use ifconfig to check whether your IP address contains an IPv6 address.

Can ipv6 be turned off in linux?

#2. Check whether there is an address in IPv6 format among the IPs monitored by the service. (netstat -tuln)

tcp 0 0 0.0.0.0:8100 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:843 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 :::8080 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 :::443 :::* LISTEN
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
udp 0 0 0.0.0.0:631 0.0.0.0:*

3. Use lsmod to check whether the ipv6 module is loaded.

Can ipv6 be turned off in linux?

If the part shown in bold above appears, it means that IPV6 has been turned on on your machine.

3. Extended information: Enable IPV6

IPv6 is supported by default, so when you want to re-enable IPv6 support, change /etc/modprobe.conf Just comment out the two instructions.

Recommended learning: Linux video tutorial

The above is the detailed content of Can ipv6 be turned off in linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn