Bridge utils config für Virtualbox Debian: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 14: | Zeile 14: | ||
bridge_fd 5 | bridge_fd 5 | ||
bridge_stp no | bridge_stp no | ||
| − | post-up iptables -t nat -j POSTROUTING -s 192.168.16.0/24 -j | + | post-up iptables -t nat -j POSTROUTING -s 192.168.16.0/24 -j MASQUERADE |
post-up echo 1 > /proc/sys/net/ipv4/ip_forward | post-up echo 1 > /proc/sys/net/ipv4/ip_forward | ||
</pre> | </pre> | ||
| + | |||
=Danach= | =Danach= | ||
*ifup -v vmbr0 | *ifup -v vmbr0 | ||
| + | =DNS und DHCP für das Netz= | ||
| + | ;Konfiguration | ||
| + | *vi /etc/dnsmasq.conf | ||
| + | interface=vmbr0 | ||
| + | bind-interfaces | ||
| + | dhcp-range=192.168.16.100,192.168.16.110,255.255.255.0,12h | ||
| + | dhcp-option=3,192.168.16.254 | ||
| + | dhcp-option=6,192.168.16.254 | ||
| + | server=8.8.8.8 | ||
| + | log-queries | ||
| + | log-dhcp | ||
| + | ;Starten und Enablen | ||
| + | *systemctl restart dnsmasq | ||
Aktuelle Version vom 8. April 2026, 12:09 Uhr
Installation
- apt install bridge-utils iptables dnsmasq
Muss in die /etc/network/interfaces
auto dummy0
iface dummy0 inet manual
pre-up modprobe dummy numdummies=1
auto vmbr0
iface vmbr0 inet static
address 192.168.16.254
netmask 255.255.255.0
bridge_ports dummy0
bridge_fd 5
bridge_stp no
post-up iptables -t nat -j POSTROUTING -s 192.168.16.0/24 -j MASQUERADE
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
Danach
- ifup -v vmbr0
DNS und DHCP für das Netz
- Konfiguration
- vi /etc/dnsmasq.conf
interface=vmbr0 bind-interfaces dhcp-range=192.168.16.100,192.168.16.110,255.255.255.0,12h dhcp-option=3,192.168.16.254 dhcp-option=6,192.168.16.254 server=8.8.8.8 log-queries log-dhcp
- Starten und Enablen
- systemctl restart dnsmasq