Le réseau sous Proxmox

De $1

 

Configurer 2 cartes réseau :

/etc/interfaces

auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
    address 192.168.0.50
    netmask 255.255.255.0
    gateway 192.168.0.1
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0


auto vmbr1
iface vmbr1 inet static
    address 192.168.0.60
    netmask 255.255.255.0
    gateway 192.168.0.1
    bridge_ports eth1
    bridge_stp off
    bridge_fd 0

 

Exemple de conf réseau

Ci dessous une configuration incluant plusieurs ip virtuelles , ceci est un exemple à adapter a vos besoins

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

 

# The loopback network interface

auto lo

iface lo inet loopback

 

auto eth0

iface eth0 inet static

        address 9X.XXX.XXX175

        netmask 255.255.255.0

        network 9X.XXX.XXX0

        broadcast 9X.XXX.XXX255

        gateway 9X.XXX.XXX254

 

auto eth0:0

iface eth0:0 inet static

    address 85.XXX.2XX.220

    netmask 255.255.255.255

    network 85.XXX.2XX.0

    broadcast 85.XXX.2XX.220

    gateway 85.XXX.2XX.254

 

 

auto eth0:1

iface eth0:1 inet static

        address 18X.XXX.XXX99

        netmask 255.255.255.0

        network 18X.XXX.XXX0

        broadcast 18X.XXX.XXX255

        gateway 18X.XXX.XXX254

auto eth0:2

iface eth0:2 inet static

        address 8X.XXX.XXX.206

        netmask 255.255.255.0

        network 87.98.140

        broadcTst 8X.XXX.XXX.255

       gateway 8X.XXX.XXX.254

 

auto vmbr0

iface vmbr0 inet static

        address 192.168.0.2

        netmask 255.255.255.0

        post-up /etc/pve/kvm-networking.sh

        post-up iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

        post-down iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

        bridge_ports dummy0

        bridge_stp off

        bridge_fd 0

 


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  192.168.1.10
        netmask  255.255.255.0
        gateway  192.168.1.2
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp


##  NAT:
auto vmbr0
iface vmbr0 inet static
        address  10.100.100.10
        netmask  255.255.0.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.100.0.0/16' -o eth0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.100.0.0/16' -o eth0 -j MASQUERADE

 

 howto05_small.pngVous en pensez quoi ?


 

 

 

 

 

Cette page n'a encore aucun contenu. Enrichissez Yakakliker en y contribuant vous aussi.

 
Images (0)
 
Commentaires (0)
Vous devez être connecté pour poster un commentaire.