纯ipv6的linux服务器网络配置方案

简介: 纯ipv6的linux服务器网络配置方案

昨天在justhost.ru上面购买了一个外国的服务器,为了“减少成本”,我没有配置ipv4,而只有ipv6。然后发现服务器用apt update无法连接镜像源进行更新。后来查了资料才发现,仅ipv6的服务器是无法解析并连接ipv4的域名或地址的,而大多数镜像源可能还是ipv4的,因此需要修改服务器的dns并配置ipv6镜像源。

1,配置服务器的DNS

这里给出一些常用公共dns:

供应商 IPv4 IPv6
Google 8.8.8.8和8.8.4.4 2001:4860:4860::8888和2001:4860:4860::8844
Cloudflare 1.1.1.1和1.0.0.1 2606:4700:4700::1111和2606:4700:4700::1001
阿里云 223.5.5.5和223.6.6.6 2400:3200::1和2400:3200:baba::1
清华大学 101.6.6.6 2001:da8::666

打开/etc/resolv.conf这个文件,可以先将其中清空,然后加入下列内容设定dns:

#谷歌 IPv6 DNS
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
#阿里云 IPv6 DNS
nameserver 2400:3200::1
nameserver 2400:3200:baba::1
#Cloudflare IPv6 DNS
nameserver 2606:4700:4700::1111
nameserver 2606:4700:4700::1001

任选两个粘贴进去即可,国外的话推荐谷歌和Cloudflare。

2,配置IPv6镜像源

目前找到的就有清华大学镜像源、上海交大镜像源和中科大镜像源支持ipv6,下面贴出Debian 10的镜像配置,其余可以到镜像站官网查看帮助。

网络异常,图片无法展示
|

清华大学:

# 清华大学-Debian 10软件源
deb https://mirrors.tuna.tsinghua.edu.cn/debian buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian buster-proposed-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian buster-proposed-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports main contrib non-free
# 清华大学-Debian 10安全更新源
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free

中科大:

# 中科大-Debian 10软件源
deb http://mirrors.ustc.edu.cn/debian buster main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-proposed-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian buster main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian buster-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free
# 中科大-Debian 10安全更新源
deb http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib non-free

上海交大:

# 上海交通大学-Debian 10软件源
deb https://mirror.sjtu.edu.cn/debian buster main contrib non-free
deb https://mirror.sjtu.edu.cn/debian buster-updates main contrib non-free
deb https://mirror.sjtu.edu.cn/debian buster-proposed-updates main contrib non-free
deb https://mirror.sjtu.edu.cn/debian buster-backports main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian buster main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian buster-updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian buster-proposed-updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian buster-backports main contrib non-free
# 上海交通大学-Debian 10安全更新源
deb https://mirror.sjtu.edu.cn/debian-security buster/updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian-security buster/updates main contrib non-free

配置完DNS和镜像源,就可以使用apt update进行更新,然后安装软件了!

相关文章
|
存储 弹性计算 网络协议
阿里云服务器ECS实例规格族是什么?不同规格CPU型号、处理器主频及网络性能参数均不同
阿里云ECS实例规格族是指具有不同性能特点和适用场景的实例类型集合。不同规格族如计算型c9i、通用算力型u1、经济型e等,在CPU型号、主频、网络性能、云盘IOPS等方面存在差异。即使CPU和内存配置相同,性能参数和价格也各不相同,适用于不同业务需求。
901 144
|
关系型数据库 Linux PHP
开源站群服务器方案:构建高效流量矩阵的全攻略
正在寻找高性价比、可控性强且功能强大的站群解决方案?小编将深度解析开源站群服务器方案,从核心优势、主流工具选型到部署实践,助您构建稳定、高效的站群流量体系。
|
运维 Linux 开发者
Linux系统中使用Python的ping3库进行网络连通性测试
以上步骤展示了如何利用 Python 的 `ping3` 库来检测网络连通性,并且提供了基本错误处理方法以确保程序能够优雅地处理各种意外情形。通过简洁明快、易读易懂、实操性强等特点使得该方法非常适合开发者或系统管理员快速集成至自动化工具链之内进行日常运维任务之需求满足。
809 18
|
安全 Linux 网络安全
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
334 0
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
|
网络协议 关系型数据库 Linux
【App Service Linux】在Linux App Service中安装 tcpdump 并抓取网络包
在App Service for Linux环境中,无法像Windows一样直接使用网络排查工具抓包。本文介绍了如何通过TCPDUMP在Linux环境下抓取网络包,包括SSH进入容器、安装tcpdump、执行抓包命令及下载分析文件的完整操作步骤。
591 5
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。
|
存储 固态存储 Linux
从 0 学服务器虚拟化:VMware 搭建 3 个虚拟主机,个人 / 小企业够用的方案
服务器虚拟化技术通过在单台物理机上运行多个虚拟机,显著提升资源利用率和管理灵活性。本文以 VMware ESXi 8.0 Update 3e 为例,详解如何搭建经济实用的虚拟化环境,支持 3 个虚拟主机稳定运行,适合个人开发者和小企业降低硬件投入、实现数据本地化与安全存储。
2742 0
|
存储 监控 Linux
Dell OpenManage Enterprise 4.5 - Dell 服务器、存储和网络设备集中管理软件
Dell OpenManage Enterprise 4.5 - Dell 服务器、存储和网络设备集中管理软件
393 0
|
弹性计算 监控 网络协议
香港云服务器访问速度慢?阿里云精品BGP线路EIP一键提速方案
香港云服务器因默认BGP线路访问不稳定,尤其中国大陆用户面临高延迟与丢包问题。本文详解问题根源,并介绍阿里云国际站推出的精品BGP线路EIP解决方案,通过直连优化显著降低延迟,提升稳定性,助力企业实现高效跨境网络访问。
|
运维 数据可视化 数据库
一小时搞定服务器软件部署:资深工程师实测方案
本文分享了一位运维工程师在短时间内将30个不同软件部署到新服务器上的实战经验。面对全新 Rocky Linux 系统,传统手工部署方式效率低下且容易出错。作者尝试多种自动化方案后,最终选择使用自动化部署工具,通过其内置的 Docker Compose 模板和可视化界面,实现快速、批量部署,大幅提升效率,30个应用仅用约1小时完成,显著节省时间和人力成本。