Ⅰ. はじめに
タイトルの通り「Proxmoxでプライベートネットワークを利用する方法」です。
例
Ⅱ. やり方
1. vmbr1 を追加する
$ vim /etc/network/interfaces auto vmbr1 iface vmbr1 inet static address 10.0.0.0/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' -o vmbr0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
2. ネットワークを再起動する
/etc/init.d/networking restart
3. vmbr1が追加された事を確認する
ip a ip route
4. DHCPサーバ(dnsmasq)をインストールする
apt install dnsmasq systemctl stop systemd-resolved systemctl disable systemd-resolved
5. dnsmasqの設定を変更する
$ vim /etc/dnsmasq.d/vnet dhcp-range=10.0.0.1,10.0.0.255,12h # 固定IP dhcp-host=BA:96:46:A6:E0:97,10.0.0.1
6. dnsmasqを起動する
systemctl restart dnsmasq systemctl enable dnsmasq
実行結果