一键 - ipv6优先或者ipv4优先或禁用

date
Feb 6, 2022
slug
tip-ipv6-ipv4-priority-change
status
Published
summary
小技巧 一个命令行
tags
tip
type
Post
URL
notion image

IPv4 优先 or IPv6优先

vi /etc/gai.conf

# priority for ipv4
precedence ::ffff:0:0/96  100

# Higher priority for IPv6 - larger number, higher priority
precedence ::/0 101

# 验证优先级 显示 IPv4 地址则代表 IPv4 优先,否则为 IPv6 优先。
curl ip.p3terx.com 
 

© Ying Bun 2021 - 2024