全球主机交流论坛
标题:
[已解决] hetzner 杜甫 买了/29 怎么设置到小鸡上?
[打印本页]
作者:
KDE
时间:
2023-12-21 00:18
标题:
[已解决] hetzner 杜甫 买了/29 怎么设置到小鸡上?
本帖最后由 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
作者:
Chynna
时间:
2023-12-21 00:39
插眼
欢迎光临 全球主机交流论坛 (https://sunk.eu.org/)
Powered by Discuz! X3.4