- 论坛徽章:
- 1
|
服务器以前一直没有事情,不知道什么原因突然API连接出错curl: (6) Couldn’t resolve host,查阅可能是IPV6的原因,但是以前已经关闭了呀!进系统查看如下结果
[root@localhost ~]# lsmod | grep ipv6
ipv6 335781 113 ip6t_REJECT
请问这样是关闭了还是没有呢?我又在虚拟机上做了几遍,依旧无法完全关闭,望大神们指导一下:
最小化安装,yum update了一下的系统
[root@localhost ~]# lsmod | grep ipv6
nf_conntrack_ipv6 7985 2
nf_defrag_ipv6 26468 1 nf_conntrack_ipv6
nf_conntrack 79206 3 nf_conntrack_ipv4,nf_conntrack_ipv6,xt_state
ipv6 335525 28 ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6,cnic,cxgb4,libcxgbi
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27 E:63:02
inet addr:192.168.1.248 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fede:6302/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27312 errors:0 dropped:0 overruns:0 frame:0
TX packets:777 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2548590 (2.4 MiB) TX bytes:170364 (166.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@localhost ~]# echo "alias net-pf-10 off" >> /etc/modprobe.d/ipv6off.conf
[root@localhost ~]# echo "options ipv6 disable=1" >> /etc/modprobe.d/ipv6off.conf
[root@localhost ~]# echo "NETWORKING_IPV6=no" >> /etc/sysconfig/network
[root@localhost ~]# echo "IPV6INIT=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# echo "IPV6_AUTOCONF=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# chkconfig ip6tables off
[root@localhost ~]# reboot -h now
重启后再查看都没有变化,ipv6依旧存在
[root@localhost ~]# lsmod | grep ipv6
ipv6 335525 25 cnic,cxgb4,libcxgbi
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27 E:63:02
inet addr:192.168.1.248 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fede:6302/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13799 (13.4 KiB) TX bytes:10745 (10.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
求指导一下,这是什么原因 |
|