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

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

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

1,配置服务器的DNS

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

供应商 IPv4 IPv6
Google 8.8.8.88.8.4.4 2001:4860:4860::88882001:4860:4860::8844
Cloudflare 1.1.1.11.0.0.1 2606:4700:4700::11112606:4700:4700::1001
阿里云 223.5.5.5223.6.6.6 2400:3200::12400: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进行更新,然后安装软件了!

相关文章
|
10月前
|
存储 弹性计算 网络协议
阿里云服务器ECS实例规格族是什么?不同规格CPU型号、处理器主频及网络性能参数均不同
阿里云ECS实例规格族是指具有不同性能特点和适用场景的实例类型集合。不同规格族如计算型c9i、通用算力型u1、经济型e等,在CPU型号、主频、网络性能、云盘IOPS等方面存在差异。即使CPU和内存配置相同,性能参数和价格也各不相同,适用于不同业务需求。
682 144
|
11月前
|
数据采集 存储 算法
MyEMS 开源能源管理系统:基于 4G 无线传感网络的能源数据闭环管理方案
MyEMS 是开源能源管理领域的标杆解决方案,采用 Python、Django 与 React 技术栈,具备模块化架构与跨平台兼容性。系统涵盖能源数据治理、设备管理、工单流转与智能控制四大核心功能,结合高精度 4G 无线计量仪表,实现高效数据采集与边缘计算。方案部署灵活、安全性高,助力企业实现能源数字化与碳减排目标。
402 0
|
9月前
|
存储 网络协议 数据库
脑控网络设计方案
本内容详细描述了一个虚构的“脑控通信网络”系统架构及通信流程,涵盖核心网络组成、用户开户流程、心灵感应终端注册、跨网络通信机制,以及脑控网与互联网、移动网的数据交互方式。内容包含模拟的通信协议设计、数据包标识、网络路由机制等技术细节,整体基于作者原创的设定,用于探讨未来通信的可能性。
352 74
|
数据采集 数据安全/隐私保护
脑控网络设计方案续写
本文补充说明了普通设备通过脑控终端热点接入互联网的数据传输流程,涵盖连接认证、数据包标识、核心网绑定与编号生成、数据转发及断开连接的完整过程,详述了设备间通信、验证、路由与逻辑删除机制,完善了脑控网络与普通互联网交互的技术闭环。
|
9月前
|
关系型数据库 Linux PHP
开源站群服务器方案:构建高效流量矩阵的全攻略
正在寻找高性价比、可控性强且功能强大的站群解决方案?小编将深度解析开源站群服务器方案,从核心优势、主流工具选型到部署实践,助您构建稳定、高效的站群流量体系。
|
9月前
|
安全 Linux 网络安全
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
244 0
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
|
10月前
|
运维 Linux 开发者
Linux系统中使用Python的ping3库进行网络连通性测试
以上步骤展示了如何利用 Python 的 `ping3` 库来检测网络连通性,并且提供了基本错误处理方法以确保程序能够优雅地处理各种意外情形。通过简洁明快、易读易懂、实操性强等特点使得该方法非常适合开发者或系统管理员快速集成至自动化工具链之内进行日常运维任务之需求满足。
665 18
|
10月前
|
网络协议 关系型数据库 Linux
【App Service Linux】在Linux App Service中安装 tcpdump 并抓取网络包
在App Service for Linux环境中,无法像Windows一样直接使用网络排查工具抓包。本文介绍了如何通过TCPDUMP在Linux环境下抓取网络包,包括SSH进入容器、安装tcpdump、执行抓包命令及下载分析文件的完整操作步骤。
488 5
|
11月前
|
Web App开发 网络协议 Linux
【Linux】网络基础
TCP/IP五层模型是网络通信的基础框架,将复杂的数据传输过程分为物理层、数据链路层、网络层、传输层和应用层,每层各司其职,协同完成远程通信。该模型确保了不同设备和网络之间的互联互通,是现代互联网运行的核心机制。
1267 5
|
10月前
|
存储 固态存储 Linux
从 0 学服务器虚拟化:VMware 搭建 3 个虚拟主机,个人 / 小企业够用的方案
服务器虚拟化技术通过在单台物理机上运行多个虚拟机,显著提升资源利用率和管理灵活性。本文以 VMware ESXi 8.0 Update 3e 为例,详解如何搭建经济实用的虚拟化环境,支持 3 个虚拟主机稳定运行,适合个人开发者和小企业降低硬件投入、实现数据本地化与安全存储。
2282 0