Я использую 20.04 LTS, но внезапно я не могу просматривать веб-сайты, IP-адреса которых, например, IPv6 (hepsiburada.com).
Даже команда apt update больше не работает, потому что Launchpad перенаправляет на адрес IPv6:
W: Couldn't get http://ppa.launchpad.net/ubuntubudgie/backports/ubuntu/dists/focal/InRelease ppa.launchpad.net:80 (2001:67c:1560:8008::19). - connect (101: Network is unreachable)
Также:
$ ping ipv6.google.com
ping: connect: Network is unreachable
Тем не менее, я могу просматривать все другие веб-сайты IPv4 без проблем.
В чем может быть проблема?
Обновление: я определил , что проблема apt связана с HTTPS или проблемой сертификата, поэтому похоже, что это не совсем проблема IPv6. Было обнаружено, что мой интернет-провайдер не поддерживает адреса IPv6. Тем не менее, как я сказал в комментарии, я не могу просматривать такие сайты, как hepsiburada.com
и yurticikargo.com
и suratkargo.com.tr
, даже Google не загружается несколько раз.
/ etc / grub / default
:
# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash nvme_core.default_ps_max_latency_us=0" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
/etc/gai.conf
:
# Configuration for getaddrinfo(3). # # So far only configuration for the destination address sorting is needed. # RFC 3484 governs the sorting. But the RFC also says that system # administrators should be able to overwrite the defaults. This can be # achieved here. # # All lines have an initial identifier specifying the option followed by # up to two values. Information specified in this file replaces the # default information. Complete absence of data of one kind causes the # appropriate default information to be used. The supported commands include: # # reload # If set to yes, each getaddrinfo(3) call will check whether this file # changed and if necessary reload. This option should not really be # used. There are possible runtime problems. The default is no. # # label # Add another rule to the RFC 3484 label table. See section 2.1 in # RFC 3484. The default is: # #label ::1/128 0 #label ::/0 1 #label 2002::/16 2 #label ::/96 3 #label ::ffff:0:0/96 4 #label fec0::/10 5 #label fc00::/7 6 #label 2001:0::/32 7 # # This default differs from the tables given in RFC 3484 by handling # (now obsolete) site-local IPv6 addresses and Unique Local Addresses. # The reason for this difference is that these addresses are never # NATed while IPv4 site-local addresses most probably are. Given # the precedence of IPv6 over IPv4 (see below) on machines having only # site-local IPv4 and IPv6 addresses a lookup for a global address would # see the IPv6 be preferred. The result is a long delay because the # site-local IPv6 addresses cannot be used while the IPv4 address is # (at least for the foreseeable future) NATed. We also treat Teredo # tunnels special. # # precedence # Add another rule to the RFC 3484 precedence table. See section 2.1 # and 10.3 in RFC 3484. The default is: # #precedence ::1/128 50 #precedence ::/0 40 #precedence 2002::/16 30 #precedence ::/96 20 #precedence ::ffff:0:0/96 10 # # For sites which prefer IPv4 connections change the last line to # #precedence ::ffff:0:0/96 100 # # scopev4 # Add another rule to the RFC 6724 scope table for IPv4 addresses. # By default the scope IDs described in section 3.2 in RFC 6724 are # used. Changing these defaults should hardly ever be necessary. # The defaults are equivalent to: # #scopev4 ::ffff:169.254.0.0/112 2 #scopev4 ::ffff:127.0.0.0/104 2 #scopev4 ::ffff:0.0.0.0/96 14 precedence ::ffff:0:0/96 100
/etc/sysctl.conf
:
# # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additional system variables. # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase # # Uncomment the next two lines to enable Spoof protection (reverse-path filter) # Turn on Source Address Verification in all interfaces to # prevent some spoofing attacks #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 # Uncomment the next line to enable TCP/IP SYN cookies # See http://lwn.net/Articles/277146/ # Note: This may impact IPv6 TCP sessions too #net.ipv4.tcp_syncookies=1 # Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 # Enabling this option disables Stateless Address Autoconfiguration # based on Router Advertisements for this host #net.ipv6.conf.all.forwarding=1 ################################################################### # Additional settings - these settings can improve the network # security of the host and prevent against some network attacks # including spoofing attacks and man in the middle attacks through # redirection. Some network environments, however, require that these # settings are disabled so review and enable them as needed. # # Do not accept ICMP redirects (prevent MITM attacks) #net.ipv4.conf.all.accept_redirects = 0 #net.ipv6.conf.all.accept_redirects = 0 # _or_ # Accept ICMP redirects only for gateways listed in our default # gateway list (enabled by default) # net.ipv4.conf.all.secure_redirects = 1 # # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # ################################################################### # Magic system request Key # 0=disable, 1=enable all, >1 bitmask of sysrq functions # See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html # for what other values do #kernel.sysrq=438 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
Обновление 2: Итак, после В ходе расследования выяснилось, что эта проблема не имеет ничего общего с IPv6. Да, моя сеть не поддерживает IPv6, но похоже, что у меня есть другие проблемы с моим интернет-провайдером, которые не имеют ничего общего с Ubuntu, поскольку у меня те же проблемы на моем телефоне Android, использующем ту же сеть.
Спасибо всем, кто помогал и предлагал идеи, и извиняюсь, что побеспокоил вас из-за неправильной проблемы.
Итак... Как выясняется, это не было проблемой IPv6. Оказывается, у моего провайдера была какая-то странная проблема при подключении к этим веб-сайтам (и другим), поэтому я связался с ними, и они исправили вещи со своей стороны. Сейчас все работает.
Спасибо всем, кто помог в этом и извините, что я потратил ваше время.
Попробуйте удалить iface eth0 inet dhcp
и iface eth0 inet6 dhcp
из / etc / network / interfaces
. Network Manager получит IPv6-адрес, если он доступен.
Если вам нужно использовать ручную настройку в / etc / network / interfaces, правильной настройкой для IPv6 будет iface eth0 inet6 auto
, поскольку во многих случаях DHCPv6 не используется на маршрутизаторе. Наиболее распространенной является конфигурация SLAAC.
Сначала проверьте, отключен ли IPv6 в вашей системе, запустив эту команду в вашем Терминале:
ip a | grep -i inet6
Если вывод этой команды пуст, это означает, что IPv6 отключен и его необходимо быть повторно включенным. Если он не пустой, это означает, что в вашей системе включен IPv6, и проблема может быть на уровне маршрутизатора или провайдера. Вы можете включить IPv6, выполнив следующие команды:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
sudo sysctl -p
Несколько замечаний, которые могут помочь. Вы увеличите свои шансы на устранение проблемы, если опубликуете оперативную обратную связь.
EDIT Если ваш компьютер портативный, попробуйте сделать то же самое из другого места. Здесь показан случай с похожими симптомами, как у вас, с аппаратным обеспечением в качестве источника проблем. Или вы можете использовать свой мобильный телефон в качестве USB tethering.
EDIT То же, что и выше, из места с комбинированным провайдером/маршрутизатором, который поддерживает IPV6 и имеет его включенным.
Подавить IPV6 (необходимо, если IPV6 окончательно недоступен)
1.1. Добавьте ipv6.disable=1
к значению GRUB_CMDLINE_LINUX_DEFAULT
(обычно имеет значение "quiet splash"
) в grub
.
Use
$ sudo nano /etc/default/grub
,
$ sudo update-grub
1.2. Перезагрузка.
Подавить IPV6.
Добавьте в /etc/gai.conf
следующую строку:
precedence ::ffff:0:0/96 100
или откомментируйте ее, если она существует.
Подавлять IPV6 (source). Используйте (я не уверен, что последняя команда нужна)
$ sudo nano /etc/sysctl.conf
<РЕДАКТИРОВАТЬ>, <ДОБАВИТЬ СТРОКИ НИЖЕ>, <СОХРАНИТЬ>
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
$ sudo sysctl --load
$ sudo systemctl restart networking
Подавление IPV6 только для apt-get
.
Добавьте -o Acquire::ForceIPv4=true
при запуске apt-get
. Или сделайте его постоянным, как здесь.
Пожалуйста, опубликуйте в вопросе вывод следующих команд
cat /etc/default/grub
cat /etc/gai.conf
cat /etc/sysctl.conf
cat /etc/apt/sources. list
inxi -N
lspci -knn | grep Net -A2
Пожалуйста, добавьте информацию по следующим пунктам