From f28b826e472e7ccc99f08e70eb9d35721f123954 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Fri, 16 Aug 2024 23:16:44 +0200 Subject: [PATCH] :memo: add usage examples --- xynat | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xynat b/xynat index 6ee603b..741b11c 100755 --- a/xynat +++ b/xynat @@ -313,6 +313,24 @@ xynat_help(){ echo echo " -h, --help - Display this help message and exit" echo " -v, --version - Display version information and exit" + echo + echo "Examples:" + echo " Add a new firewall and NAT for a VM which has IP address '192.168.234.2' and is a member of the bridge interface 'br2'" + echo " All traffic to and from local addresses will be blocked; Traffic to public addresses will be allowed" + echo " $0 --add --iface \"br2\" --vm-address \"192.168.234.2\"" + echo + echo " Same as first example, but use '192.168.123.99' as source address for outgoing connections" + echo " $0 --add --iface \"br2\" --vm-address \"192.168.234.2\" --public-ip \"192.168.123.99\"" + echo + echo " Same as first example, but also block all traffic to and from '233.252.0.0/24'" + echo " $0 --add --iface \"br2\" --vm-address \"192.168.234.2\" --block \"233.252.0.0/24\"" + echo + echo " Same as second example, but allow incomming and outgoing connections from host device" + echo " The VM will also be accessible from devices in '192.168.137.64/30' via its public address" + echo " $0 --add --iface \"br2\" --vm-address \"192.168.234.2\" --public-ip \"192.168.123.99\" --allow-host --allow-in \"192.168.137.64/30\"" + echo + echo " Remove all firewall and NAT rules for iface 'br2'" + echo " $0 --remove --iface \"br2\"" }