From d21b5166d76164e797ad3c61addbc1f3c30cdde5 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:05:47 -0700 Subject: [PATCH] add usage command with new switches --- usr/local/share/bastille/rdr.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/usr/local/share/bastille/rdr.sh b/usr/local/share/bastille/rdr.sh index 3028ac03..0304af4d 100644 --- a/usr/local/share/bastille/rdr.sh +++ b/usr/local/share/bastille/rdr.sh @@ -32,7 +32,17 @@ . /usr/local/etc/bastille/bastille.conf usage() { - error_exit "Usage: bastille rdr TARGET [clear|list|(tcp|udp host_port jail_port [log ['(' logopts ')'] ] )]" + error_notify "Usage: bastille rdr TARGET [options(s)] [clear|list|(tcp|udp host_port jail_port [log ['(' logopts ')'] ] )]" + + cat << EOF + Options: + + -i [interface] | -- Set the interface to create the rdr rule on. Useful if you have multiple interfaces. + -s [source ip] | -- Limit rdr to a source IP. Useful to only allow access from a certian IP or subnet. + -d [destination ip ] | -- Limit rdr to a destination IP. Useful if you have multiple IPs on one interface. + +EOF + exit 1 } # Handle special-case commands first.