Skip to main content

Tips réseaux


Second bridge

cat /etc/network/interfaceauto vmbr1
iface vmbr1 inet static
  address 192.168.122.1
  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 '192.168.122.0/24' -o vmbr0 -j MASQUERADE
  post-down iptables -t nat -D POSTROUTING -s '192.168.122.0/24' -o vmbr0  -j MASQUERADE