我debian 8
在我的服务器上运行。最近,服务器开始只对所有传出 TCP 连接使用 IPv6。但是,它仍然接受 IPv4 的传入连接。
因此,我现在无法访问任何网站(端口 80),建立任何 ssh 连接(端口 22),也无法通过服务器上的任何 TCP 端口访问任何其他传出主机。
iptables -F
我通过后跟完全禁用了所有 iptables 规则iptables -X
,问题仍然存在。
以下是一些可能相关的命令输出:
% sudo ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether aa:bf:5c:77:b2:82 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether f2:3c:91:96:da:28 brd ff:ff:ff:ff:ff:ff
inet 45.33.123.70/24 brd 45.33.123.255 scope global eth0
valid_lft forever preferred_lft forever
inet 45.33.5.47/24 scope global eth0:1
valid_lft forever preferred_lft forever
inet 192.168.135.4/17 scope global eth0:2
valid_lft forever preferred_lft forever
inet6 2600:3c00::f03c:91ff:fe96:da28/64 scope global mngtmpaddr dynamic
valid_lft 87sec preferred_lft 27sec
inet6 fe80::f03c:91ff:fe96:da28/64 scope link
valid_lft forever preferred_lft forever
4: teql0: <NOARP> mtu 1500 qdisc noop state DOWN group default qlen 100
link/void
5: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
6: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN group default qlen 1000
link/gre 0.0.0.0 brd 0.0.0.0
7: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1476 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
8: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1464 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
10: ip6_vti0@NONE: <NOARP> mtu 1364 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd ::
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
12: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd ::
13: ip6gre0@NONE: <NOARP> mtu 1448 qdisc noop state DOWN group default qlen 1000
link/gre6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
% sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 45.33.123.1 0.0.0.0 UG 0 0 0 eth0
45.33.5.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
45.33.123.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.128.0 0.0.0.0 255.255.128.0 U 0 0 0 eth0
我不知道是什么导致了这种对仅 IPv6 输出的更改。但无论如何,我只想回到 IPv4 作为所有传出连接的默认值。
感谢您的任何见解和建议。