嘟嘟社区

pve开nat问题


本帖最后由 山本大意失仙人 于 2021-11-21 08:10 编辑

不管咋样,小鸡就是上不了网
求大佬指点,机器是腾讯云248
贴配置:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you’re doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the ‘source’ or ‘source-directory’ directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface ens5 inet dhcp

auto vmbr0
iface vmbr0 inet static
        address 10.0.24.6/24
        netmask 255.255.255.0
        gateway 10.0.24.1
        bridge-ports ens5
        bridge-stp off
        bridge-fd 0
#private sub network

auto vmbr1
iface vmbr1 inet static
        address 10.10.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s ‘10.10.10.0/24’ -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s ‘10.10.10.0/24’ -j MASQUERADE

不懂,pve开个鸡都这样手工设置一次,是人用的不?

jpfree 发表于 2021-11-21 08:29
不懂,pve开个鸡都这样手工设置一次,是人用的不?

是挺麻烦的