Multiple IPs and LAN

Discussion in 'Proxmox VE: Networking and Firewall' started by Dk2014, Dec 8, 2018.

  1. Dk2014

    Dk2014 New Member

    Joined:
    Sep 25, 2018
    Messages:
    4
    Likes Received:
    0
    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
     
  2. Richard

    Richard Proxmox Staff Member
    Staff Member

    Joined:
    Mar 6, 2015
    Messages:
    473
    Likes Received:
    13

    The netmask for 10.10.10.x has to be /24
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice