From ae827ab2c9188972881595e2d8d371250d56bc2b Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sat, 7 Sep 2024 15:09:23 +0200 Subject: [PATCH] :memo: improve kvm guide --- README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8caf6af..756f635 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # XYNat NAT with integrated firewall for use with VMs and containers + + ## Setup Instructions Install required tools (Debian): ```console @@ -19,6 +21,8 @@ Clone git repository: # git clone https://git.tjdev.de/DrMaxNix/xynat.git ``` + + ## Usage ``` Usage: ./xynat [OPTIONS] @@ -60,9 +64,17 @@ Examples: ./xynat --remove --iface "br2" ``` -## Example `/etc/network/interfaces` -#### Host -``` + + +## Example: Isolate a KVM Virtual Machine +#### Host (`/etc/network/interfaces`) +```bash +auto enp1s0 +iface enp1s0 inet static + # ... + + up ifconfig enp1s0:1 10.0.0.4 netmask 255.0.0.0 up + auto br-vm-test iface br-vm-test inet static bridge_ports none @@ -73,8 +85,8 @@ iface br-vm-test inet static post-down /opt/xynat/xynat ``` -#### Guest -``` +#### Guest (`/etc/network/interfaces`) +```bash auto eth0 iface eth0 inet static address 192.168.234.2