纯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进行更新,然后安装软件了!

相关文章
|
8天前
|
安全 Linux 网络安全
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
37 0
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
|
2月前
|
运维 Linux 开发者
Linux系统中使用Python的ping3库进行网络连通性测试
以上步骤展示了如何利用 Python 的 `ping3` 库来检测网络连通性,并且提供了基本错误处理方法以确保程序能够优雅地处理各种意外情形。通过简洁明快、易读易懂、实操性强等特点使得该方法非常适合开发者或系统管理员快速集成至自动化工具链之内进行日常运维任务之需求满足。
120 18
|
2月前
|
网络协议 关系型数据库 Linux
【App Service Linux】在Linux App Service中安装 tcpdump 并抓取网络包
在App Service for Linux环境中,无法像Windows一样直接使用网络排查工具抓包。本文介绍了如何通过TCPDUMP在Linux环境下抓取网络包,包括SSH进入容器、安装tcpdump、执行抓包命令及下载分析文件的完整操作步骤。
120 5
|
2月前
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。
|
2月前
|
存储 弹性计算 网络协议
阿里云服务器ECS实例规格族是什么?不同规格CPU型号、处理器主频及网络性能参数均不同
阿里云ECS实例规格族是指具有不同性能特点和适用场景的实例类型集合。不同规格族如计算型c9i、通用算力型u1、经济型e等,在CPU型号、主频、网络性能、云盘IOPS等方面存在差异。即使CPU和内存配置相同,性能参数和价格也各不相同,适用于不同业务需求。
|
2月前
|
存储 监控 Linux
Dell OpenManage Enterprise 4.5 - Dell 服务器、存储和网络设备集中管理软件
Dell OpenManage Enterprise 4.5 - Dell 服务器、存储和网络设备集中管理软件
44 0
|
3月前
|
Web App开发 网络协议 Linux
【Linux】网络基础
TCP/IP五层模型是网络通信的基础框架,将复杂的数据传输过程分为物理层、数据链路层、网络层、传输层和应用层,每层各司其职,协同完成远程通信。该模型确保了不同设备和网络之间的互联互通,是现代互联网运行的核心机制。
184 5
|
3月前
|
网络协议 Linux 开发者
深入Linux中UDP网络通信机制编程探索
以上步骤概述了Linux中UDP网络通信的编程机制。在实现时,因关注细节和上下文环境可能有所调整,但大致流程是一致的。这些知识片段旨在帮助开发者快速上手Linux下的UDP编程,并提供可靠的信息作为编程的基础。在编程实践中,应结合实际业务需求,设计合适的数据传输协议,确保数据的正确性和实时性。
69 0
|
3月前
|
监控 Linux 网络安全
FinalShell SSH工具下载,服务器管理,远程桌面加速软件,支持Windows,macOS,Linux
FinalShell是一款国人开发的多平台SSH客户端工具,支持Windows、Mac OS X和Linux系统。它提供一体化服务器管理功能,支持shell和sftp同屏显示,命令自动提示,操作便捷。软件还具备加速功能,提升访问服务器速度,适合普通用户和专业人士使用。
241 0
|
10月前
|
SQL 安全 网络安全
网络安全与信息安全:知识分享####
【10月更文挑战第21天】 随着数字化时代的快速发展,网络安全和信息安全已成为个人和企业不可忽视的关键问题。本文将探讨网络安全漏洞、加密技术以及安全意识的重要性,并提供一些实用的建议,帮助读者提高自身的网络安全防护能力。 ####
226 17

热门文章

最新文章