Disable IPv6 in centos/RedHat

Source: Internet
Author: User

1. Check whether IPv6 is enabled
1.1 Use ifconfig to check whether your IP address contains an IPv6 address
Inet ADDR: 192.168.198.128 bcast: 192.168.198.255 mask: 255.255.255.0
Inet6 ADDR: fe80: 20c: 29ff: fee4: 1d8/64 scope: Link
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 1080 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 890 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX Bytes: 89517 (87.4 kib) TX Bytes: 122147 (119.2 kib)
Interrupt: 185 base address: 0x1400
The red part is the IPv6 address.
1.2 check whether the IP address of the Service Listening has an IPv6 address
[Root @ centos ~] # Netstat-tulnactive Internet connections (only servers) proto Recv-Q send-Q local address foreign address statetcp 0 0 0.0.0.0: 613 0.0.0.0: * listentcp 0 0 0.0.0.0: 3306 0.0.0.0: * listentcp 0 0 0.0.0.0: 111 0.0.0.0: * listentcp 0 0 0.0.0.0: 21 0.0.0.0: * listentcp 0 0 127.0.0.1: 631 0.0.0.0: * listentcp 0 0 127.0.0.1: 25 0.0.0.0: * listentcp 0 0: 80: * listentcp 0 0: 22: * listenudp 0 0 0.0.0.0: 68 0.0.0.0: * UDP 0 0 0.0.0.0: 607 0.0.0.0: * UDP 0 0 0.0.0.0: 610 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 :*
1.3 Use lsmod | grep IPv6 to check whether IPv6 modules are loaded
[Root @ centos ~] # Lsmod | grep ipv6ipv6 243425 19
2. Disable/enable IPv6
2.1 Disable Ipv6
# Vi/etc/modprobe. conf
Add the following two lines
Alias net-pf-10 off
Alias IPv6 off
Save and exit, and restart the system.
After restarting, you can use the preceding three methods to verify whether IPv6 support has been disabled.
2.2 enable IPv6
IPv6 is supported by default, so when you want to restart IPv6 support, comment out the two commands in/etc/modprobe. conf.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.