全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 542|回复: 1

[已解决] hetzner 杜甫 买了/29 怎么设置到小鸡上?

[复制链接]
发表于 2023-12-21 00:18:06 | 显示全部楼层 |阅读模式
本帖最后由 KDE 于 2023-12-21 03:01 编辑

hetzner 杜甫

DD了 PVE 8.1

买了 One additional subnet /29

怎么设置到小鸡上?

看了文档没看明白
https://docs.hetzner.com/robot/dedicated-server/virtualization/general/

已解决

cat <<EOF> /etc/network/interfaces

auto lo
iface lo inet loopback

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet dhcp
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

auto vmbr2
iface vmbr2 inet static
        address 95.0.0.1/29 // 写可用ip 第一个 作为网关
        bridge_ports none
        bridge_stp off
        bridge_fd 0

EOF

sysctl -w net.ipv4.ip_forward=1
nft flush ruleset
nft add table inet nat
nft add chain inet nat postrouting { type nat hook postrouting priority 100 \; }
nft add rule inet nat postrouting oif vmbr0 masquerade

剩下的就是小鸡设置
地址:95.0.0.2/29
网关:95.0.0.1

然后ping 8.8.8.8
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-28 23:23 , Processed in 0.071598 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表