Multiple IPs and LAN

Dk2014

Active Member
Sep 25, 2018
10
0
41
28
Code:
auto lo
iface lo inet loopback

iface enp2s0f0 inet manual

iface enp2s0f1 inet manual

auto vmbr0
iface vmbr0 inet static
    address  public_ip
    netmask  255.255.255.0
    gateway  100.64.1.9
    bridge-ports enp2s0f0
    bridge-stp off
    bridge-fd 0

auto vmbr1
iface vmbr1 inet static
    address  10.10.10.254
    netmask  255.255.255.0
    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

only configure lan ip, can ping each other
ScreenShot_18-12-08_15-12-50.png
after add public ip, 10.10.10.6 can't ping 10.10.10.4, but .4 can ping .6
ScreenShot_18-12-08_15-13-20.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!