惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
Webroot Blog
Webroot Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Threat Research - Cisco Blogs
V2EX - 技术
V2EX - 技术
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
S
Schneier on Security
I
InfoQ
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The GitHub Blog
The GitHub Blog
S
Security @ Cisco Blogs
O
OpenAI News
W
WeLiveSecurity
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
Simon Willison's Weblog
Simon Willison's Weblog
人人都是产品经理
人人都是产品经理
Cloudbric
Cloudbric
The Last Watchdog
The Last Watchdog
The Hacker News
The Hacker News
Google Online Security Blog
Google Online Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
NISL@THU
NISL@THU
T
Tailwind CSS Blog
V
Visual Studio Blog
PCI Perspectives
PCI Perspectives
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
D
DataBreaches.Net
B
Blog RSS Feed
N
News and Events Feed by Topic
N
News and Events Feed by Topic
H
Heimdal Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
腾讯CDC
Latest news
Latest news
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
WordPress大学
WordPress大学
V
V2EX
aimingoo的专栏
aimingoo的专栏
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Register - Security
The Register - Security
Help Net Security
Help Net Security

林中阴影

林中阴影 | 关于蓝光刻录的一些调查 林中阴影 | 半年前的NAS升级 林中阴影 | “智能” 家居笔记:一→两年后的回顾 林中阴影 | 旧手机做RDP客户端的一些尝试 林中阴影 | 一些矿渣的耗电量 林中阴影 | 穷人的IP-KVM远程访问 林中阴影 | 内网访问第三季:在运营商的CGNAT网络下 林中阴影 | “智能”家居笔记,其之二 林中阴影 | “智能”家居笔记,其之一 林中阴影 | 仅IPv6家庭内网服务实现v6+v4双栈访问 林中阴影 | 下载装小蜜监理拍摄的图片 林中阴影 | 几物互联 林中阴影 | 整了个“新”平板 林中阴影 | 获取招商信用卡账单的另一种方法 林中阴影 | 我在GitHub的⭐ 林中阴影 | Python与光学计算,2021 林中阴影 | 你可能并不需要内网穿透 林中阴影 | 2020 林中阴影 | 和(基本上)什么也不能连的电脑传递信息 林中阴影 | 我将贻笑于大方之家 林中阴影 | 一个新主题 林中阴影 | 2019过去了,我…… 林中阴影 | Beancount试用,半年后 林中阴影 | 自动输入剪贴板中的内容 林中阴影 | Unicode与数学公式 林中阴影 | Python中光学计算相关的库/Awesome Python for Optics 林中阴影 | 一本厕纸小说 林中阴影 | 震惊!为了在Windows上访问EXT4分区,他竟然做出了这样的事! 林中阴影 | 我的2018 林中阴影 | 笔记软件踩雷 林中阴影 | 关于BitMEX的杠杆 林中阴影 | 用Cloudflare的v4 API实现动态DNS(DDNS) 林中阴影 | 随机性从哪里来? 林中阴影 | 这次是纽约公共图书馆……而且居然还有第三部分? 林中阴影 | 这次是纽约公共图书馆……的第二天! 林中阴影 | 这次是纽约公共图书馆…… History Data for Bitcoin and Altcoins 林中阴影 | 幂律分布与Zipf's Law 林中阴影 | 学习笔记:神经网络的优化策略 林中阴影 | 最近对博客的改动 林中阴影 | 换了个新域名 林中阴影 | VPS初始化checklist 林中阴影 | 利用kcpraw流量加速 Aeolipile boiling: Your blog (with code and formula) on Steem! Aeolipile update: new theme, link generator and more! 林中阴影 | 离 林中阴影 | 社交恐惧症患者也想用Steem,所以我做了Aeolipile Aeolipile: your code and formula on Steem 林中阴影 | 2017年的fontconfig设置 林中阴影 | 为hugo加入数学公式支持 林中阴影 | 更琐碎的编辑器细节 / Some more trival details about Steemit 林中阴影 | 对Steem的一些细节考察 / A closer look to Steem 林中阴影 | 在Hugo中折叠部分内容 Brave New World: Firefox to Quantum Yesterday Once More: Firefox to Waterfox 林中阴影 | 首都图书馆半日游 林中阴影 | 关于那个IME helper Auto-Switch IME in Vim-Mode-Plus for Atom Editor 林中阴影 | 短消息:联通IPV6 林中阴影 | 迁移到hugo,第三部分:可是我想要更多的feed地址… 林中阴影 | 由wordpress到hugo:I 林中阴影 | 迁移到hugo,第二部分:部署到github 林中阴影 | Dota 2里,什么技能的冷却时间最短? 林中阴影 | 五年 林中阴影 | 为什么已经在Word里用M$的EMF格式了,图像还是不清楚? 林中阴影 | 用nethogs实时监控每个程序的流量使用 林中阴影 | shadowsocks 2016: 一次性认证,KCP及其他 林中阴影 | Deus ex machina 林中阴影 | QArt:更漂亮的QR码 林中阴影 | 我失去了heysh.tk域名 林中阴影 | 一个简单的在线LRC编辑器 林中阴影 | 野路子科研工具二则 林中阴影 | 我有显示器辣 林中阴影 | pentadactyl 和 Firefox 43 林中阴影 | 2014年的总结 林中阴影 | shadowsocks,ipv6和便宜的VPS,还有OpenVPN 林中阴影 | 红色楼梯 林中阴影 | 用于OPENWRT的流量监控脚本:wrtbwmon 林中阴影 | SFW:治疗拖延症的一次有益尝试 林中阴影 | 木漏れ日 林中阴影 | 一次奇怪的firefox故障,还有,一个普通市民是怎么修电脑的 林中阴影 | Mortal 林中阴影 | vim again 林中阴影 | 邪恶的Archlinux 林中阴影 | 十一年前,以及今天 林中阴影 | 贺叶霜的树 林中阴影 | Limited Gear Works 林中阴影 | 永生,其二 林中阴影 | 我的云上逃亡,或,google reader的替代品 林中阴影 | 如果你像我一样主力使用xfce但又觉得GNOME3也许会变得好一点于是安装之后才发现果然还是无法接受 林中阴影 | CATIA是个好软件 林中阴影 | blog再次复活 林中阴影 | 2012-2013 林中阴影 | Texlive 在archlinux上的安装,以及中文字体的设置 林中阴影 | phpwind论坛刷分脚本(可用于openwrt) 林中阴影 | THU课程表导出,油猴脚本,输出vcal 林中阴影 | html5-世界变动率计数器(仮) 林中阴影 | 总结:简单的vCal/iCalendar/.ics格式说明 林中阴影 | Hello Again~ 林中阴影 | chicken
林中阴影 | 与IPv6地址战斗
2025-06-04 · via 林中阴影

捣腾家里服务器的另一些副产品。

配置ULA前缀

当你需要设置IPv6网关时,常常需要一个不随着运营商前缀变化的内网地址,这时候设置ULA很好用。

OpenWrt设置ULA前缀

OpenWrt设置ULA前缀

这样,在需要临时修改网关时,可以直接

sudo ip -6 route del default && sudo ip -6 route add default via fd22:9:30::88:88 metric 100

其中,fd22:9:30::88:88是网关地址。

自定义后缀

相比于60d1:24e0:fe4a:5c66这样的后缀,还是::88更帅一些。回字自定义后缀有4种写法,我们Linux真是太厉害辣。

如果是原生Debian,用ifupdown的话:

# /etc/network/interfaces
iface <你的ensXX> inet6 auto
        post-up /sbin/ip token set ::88 dev $IFACE

如果是Ubuntu(或者Ubuntu味道的Armbian),一般使用networkmanager:

sudo nmcli connection modify "Wired connection 1" ipv6.addr-gen-mode eui64
sudo nmcli connection modify "Wired connection 1" ipv6.ip6-privacy 0
sudo nmcli connection modify "Wired connection 1" ipv6.token "::88"

如果是(直接安装的)OpenMediaVault,它使用netplan:

# touch /etc/netplan/30-fix-token.yaml
network:
  ethernets:
    ens18:
      ipv6-address-token: "::123:123"
# sudo netplan apply

应该还会有人用systemd-networkd配置网络,自己读manpage去吧,祝你成功。

更快地推送IPv6地址

之前的DDNS更新脚本,或者ddns-go,都是使用cron来轮询的。而ip monitor命令不需要轮询,在IP地址变更的第一时间就会发送消息。配合靠谱的推送服务,可以比别人提前……呃……大概五分钟。

所以没什么用处,建议直接ddns-go。

#cat /etc/systemd/system/dns-updater.service
[Unit]
Description=Dynamic DNS updater
DefaultDependencies=no
Wants=local-fs.target
After=local-fs.target
Wants=network-pre.target
Before=network-pre.target

[Service]
Type=exec
ExecStart=/opt/ddns-updater

[Install]
WantedBy=sysinit.target
#cat /opt/ddns-updater
#!/bin/sh -e

ip -o -6 monitor address |
    while read index iface proto addr dummy scope temporary dummy; do
        case "$iface:$proto:$scope:$temporary" in
            ens18:inet6:global:dynamic)
                addr="${addr%/*}"
                case "$addr" in
                        f*) continue ;;   # 跳过以 f 开头的地址
                esac
                if [ "$addr" != "$current" ]; then
                    NEW_IP="$addr"
                    # 我这里发送到了企业微信机器人,也可以用bark、nfty.sh之类
                    curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxx' \
                        -H 'Content-Type: application/json' \
                        -d "{
                            \"msgtype\": \"text\",
                            \"text\": {
                                \"content\": \"IPv6地址已更新:$NEW_IP\"
                            }
                        }"
                    echo "已通知企业微信,新地址:$NEW_IP"
                    current="$addr"
                fi;;
        esac
    done