Nat Netz Linux

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Bridge anlegen

An die Datei /etc/network/interfaces anfügen
auto vmbr0
iface vmbr0 inet static
    address 10.0.10.1
    netmask 255.255.255.0
    bridge_ports none
    post-up iptables -t nat -A POSTROUTING -j MASQUERADE -s 10.0.10.10/24
    pre-down iptables -t nat -D POSTROUTING -j MASQUERADE -s 10.0.10.10/24
    post-up sysctl -w net.ipv4.ip_forward=1
    bridge_fd 5
    bridge_stp no

Interface hochfahren

  • ifup vmbr0