mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 16:54:10 +01:00
Add 'ipdecimal' command
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3114 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f0c28326a8
commit
7f39d760b7
@ -16,6 +16,10 @@ Changes in 3.0.3
|
||||
|
||||
8) Add traffic shaping information to "dump" output.
|
||||
|
||||
9) Allow 'none' in the COPY column of /etc/shorewall/providers.
|
||||
|
||||
10) Implement 'ipdecimal' command.
|
||||
|
||||
Changes in 3.0.2
|
||||
|
||||
1) Typos in the Samples corrected.
|
||||
|
@ -1287,7 +1287,11 @@ setup_providers()
|
||||
|
||||
if [ "x${duplicate:=-}" != x- ]; then
|
||||
if [ "x${copy:=-}" != "x-" ]; then
|
||||
copy="$interface $(separate_list $copy)"
|
||||
if [ "x${copy}" = xnone ]; then
|
||||
copy=$interface
|
||||
else
|
||||
copy="$interface $(separate_list $copy)"
|
||||
fi
|
||||
copy_and_edit_table
|
||||
else
|
||||
copy_table
|
||||
|
@ -167,11 +167,17 @@ hits)
|
||||
;;
|
||||
|
||||
ipcalc)
|
||||
echo "ipcalc: ipcalc [ address mask | address/vlsm ]
|
||||
echo "ipcalc: ipcalc { address mask | address/vlsm }
|
||||
Ipcalc displays the network address, broadcast address,
|
||||
network in CIDR notation and netmask corresponding to the input[s]."
|
||||
;;
|
||||
|
||||
ipdecimal)
|
||||
echo "ipdecimal: ipdecimal { <IP address> | <integer> }
|
||||
Converts an IP address into its 32-bit decimal equivalent and
|
||||
vice versa"
|
||||
;;
|
||||
|
||||
iprange)
|
||||
echo "iprange: iprange address1-address2
|
||||
Iprange decomposes the specified range of IP addresses into the
|
||||
|
@ -59,7 +59,8 @@
|
||||
# COPY A comma-separated lists of other interfaces on your
|
||||
# firewall. Only makes sense when DUPLICATE is 'main'.
|
||||
# Only copy routes through INTERFACE and through
|
||||
# interfaces listed here.
|
||||
# interfaces listed here. If you only wish to copy
|
||||
# routes through INTERFACE, enter 'none' here.
|
||||
#
|
||||
# Example: You run squid in your DMZ on IP address 192.168.2.99. Your DMZ
|
||||
# interface is eth2
|
||||
|
@ -65,6 +65,13 @@ New Features in 3.0.3
|
||||
now included in the output from "shorewall dump". This will aid us in
|
||||
analyzing traffic shaping problems.
|
||||
|
||||
5) You can now specify 'none' in the COPY column of /etc/shorewall/providers
|
||||
to signal that you want Shorewall to only copy routes through the interface
|
||||
listed in the INTERFACE column.
|
||||
|
||||
Note: This works on older versions of Shorewall as well. It is
|
||||
now documented.
|
||||
|
||||
Problems Corrected in 3.0.2
|
||||
|
||||
1) A couple of typos in the one-interface sample configuration have
|
||||
|
@ -92,7 +92,7 @@
|
||||
# shorewall restore [ <file> ] Restore the state of the firewall from
|
||||
# previously saved information.
|
||||
#
|
||||
# shorewall ipaddr [ <address>/<cidr> | <address> <netmask> ]
|
||||
# shorewall ipaddr { <address>/<cidr> | <address> <netmask> }
|
||||
#
|
||||
# Displays information about the network
|
||||
# defined by the argument[s]
|
||||
@ -100,6 +100,11 @@
|
||||
# shorewall iprange <address>-<address> Decomposes a range of IP addresses into
|
||||
# a list of network/host addresses.
|
||||
#
|
||||
# shorewall ipdecimal { <address> | <integer> }
|
||||
#
|
||||
# Displays the decimal equivalent of an IP
|
||||
# address and vice versa.
|
||||
#
|
||||
# shorewall safe-start Starts the firewall and promtp for a c
|
||||
# confirmation to accept or reject the new
|
||||
# configuration
|
||||
@ -507,7 +512,8 @@ usage() # $1 = exit status
|
||||
echo " forget [ <file name> ]"
|
||||
echo " help [ <command > | host | address ]"
|
||||
echo " hits"
|
||||
echo " ipcalc [ <address>/<vlsm> | <address> <netmask> ]"
|
||||
echo " ipcalc { <address>/<vlsm> | <address> <netmask> }"
|
||||
echo " ipdecimal { <address> | <integer> }"
|
||||
echo " iprange <address>-<address>"
|
||||
echo " logwatch [<refresh interval>]"
|
||||
echo " refresh"
|
||||
@ -844,7 +850,7 @@ case "$1" in
|
||||
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $@
|
||||
;;
|
||||
show|list)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
case "$2" in
|
||||
connections)
|
||||
[ $# -gt 2 ] && usage 1
|
||||
@ -972,7 +978,7 @@ case "$1" in
|
||||
exit $status
|
||||
;;
|
||||
dump)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ $# -eq 1 ] || usage 1
|
||||
clear_term
|
||||
echo "Shorewall-$version Dump at $HOSTNAME - $(date)"
|
||||
@ -1050,7 +1056,7 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
hits)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ $# -eq 1 ] || usage 1
|
||||
clear_term
|
||||
echo "Shorewall-$version Hits at $HOSTNAME - $(date)"
|
||||
@ -1112,7 +1118,7 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
logwatch)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
if [ $# -eq 2 ]; then
|
||||
logwatch $2
|
||||
elif [ $# -eq 1 ]; then
|
||||
@ -1122,7 +1128,7 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
drop)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ $# -eq 1 ] && usage 1
|
||||
mutex_on
|
||||
while [ $# -gt 1 ]; do
|
||||
@ -1135,7 +1141,7 @@ case "$1" in
|
||||
mutex_off
|
||||
;;
|
||||
reject)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ $# -eq 1 ] && usage 1
|
||||
mutex_on
|
||||
while [ $# -gt 1 ]; do
|
||||
@ -1148,7 +1154,7 @@ case "$1" in
|
||||
mutex_off
|
||||
;;
|
||||
allow)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ $# -eq 1 ] && usage 1
|
||||
mutex_on
|
||||
while [ $# -gt 1 ]; do
|
||||
@ -1162,7 +1168,7 @@ case "$1" in
|
||||
mutex_off
|
||||
;;
|
||||
save)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
|
||||
case $# in
|
||||
1)
|
||||
@ -1236,7 +1242,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
iprange)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
case $2 in
|
||||
*.*.*.*-*.*.*.*)
|
||||
ip_range $2
|
||||
@ -1246,6 +1252,17 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ipdecimal)
|
||||
[ -n "$debugging" ] && set -x
|
||||
case $2 in
|
||||
*.*.*.*)
|
||||
echo " $(decodeaddr $2)"
|
||||
;;
|
||||
*)
|
||||
echo " $(encodeaddr $2)"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
restore)
|
||||
case $# in
|
||||
1)
|
||||
@ -1283,7 +1300,7 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
call)
|
||||
[ -n "$debugging" ] && set -x
|
||||
[ -n "$debugging" ] && set -x
|
||||
#
|
||||
# Undocumented way to call functions in /usr/share/shorewall/functions directly
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user