mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02: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.
|
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
|
Changes in 3.0.2
|
||||||
|
|
||||||
1) Typos in the Samples corrected.
|
1) Typos in the Samples corrected.
|
||||||
|
@ -1287,7 +1287,11 @@ setup_providers()
|
|||||||
|
|
||||||
if [ "x${duplicate:=-}" != x- ]; then
|
if [ "x${duplicate:=-}" != x- ]; then
|
||||||
if [ "x${copy:=-}" != "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
|
copy_and_edit_table
|
||||||
else
|
else
|
||||||
copy_table
|
copy_table
|
||||||
|
@ -167,11 +167,17 @@ hits)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
ipcalc)
|
ipcalc)
|
||||||
echo "ipcalc: ipcalc [ address mask | address/vlsm ]
|
echo "ipcalc: ipcalc { address mask | address/vlsm }
|
||||||
Ipcalc displays the network address, broadcast address,
|
Ipcalc displays the network address, broadcast address,
|
||||||
network in CIDR notation and netmask corresponding to the input[s]."
|
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)
|
iprange)
|
||||||
echo "iprange: iprange address1-address2
|
echo "iprange: iprange address1-address2
|
||||||
Iprange decomposes the specified range of IP addresses into the
|
Iprange decomposes the specified range of IP addresses into the
|
||||||
|
@ -59,7 +59,8 @@
|
|||||||
# COPY A comma-separated lists of other interfaces on your
|
# COPY A comma-separated lists of other interfaces on your
|
||||||
# firewall. Only makes sense when DUPLICATE is 'main'.
|
# firewall. Only makes sense when DUPLICATE is 'main'.
|
||||||
# Only copy routes through INTERFACE and through
|
# 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
|
# Example: You run squid in your DMZ on IP address 192.168.2.99. Your DMZ
|
||||||
# interface is eth2
|
# 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
|
now included in the output from "shorewall dump". This will aid us in
|
||||||
analyzing traffic shaping problems.
|
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
|
Problems Corrected in 3.0.2
|
||||||
|
|
||||||
1) A couple of typos in the one-interface sample configuration have
|
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
|
# shorewall restore [ <file> ] Restore the state of the firewall from
|
||||||
# previously saved information.
|
# previously saved information.
|
||||||
#
|
#
|
||||||
# shorewall ipaddr [ <address>/<cidr> | <address> <netmask> ]
|
# shorewall ipaddr { <address>/<cidr> | <address> <netmask> }
|
||||||
#
|
#
|
||||||
# Displays information about the network
|
# Displays information about the network
|
||||||
# defined by the argument[s]
|
# defined by the argument[s]
|
||||||
@ -100,6 +100,11 @@
|
|||||||
# shorewall iprange <address>-<address> Decomposes a range of IP addresses into
|
# shorewall iprange <address>-<address> Decomposes a range of IP addresses into
|
||||||
# a list of network/host addresses.
|
# 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
|
# shorewall safe-start Starts the firewall and promtp for a c
|
||||||
# confirmation to accept or reject the new
|
# confirmation to accept or reject the new
|
||||||
# configuration
|
# configuration
|
||||||
@ -507,7 +512,8 @@ usage() # $1 = exit status
|
|||||||
echo " forget [ <file name> ]"
|
echo " forget [ <file name> ]"
|
||||||
echo " help [ <command > | host | address ]"
|
echo " help [ <command > | host | address ]"
|
||||||
echo " hits"
|
echo " hits"
|
||||||
echo " ipcalc [ <address>/<vlsm> | <address> <netmask> ]"
|
echo " ipcalc { <address>/<vlsm> | <address> <netmask> }"
|
||||||
|
echo " ipdecimal { <address> | <integer> }"
|
||||||
echo " iprange <address>-<address>"
|
echo " iprange <address>-<address>"
|
||||||
echo " logwatch [<refresh interval>]"
|
echo " logwatch [<refresh interval>]"
|
||||||
echo " refresh"
|
echo " refresh"
|
||||||
@ -844,7 +850,7 @@ case "$1" in
|
|||||||
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $@
|
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $@
|
||||||
;;
|
;;
|
||||||
show|list)
|
show|list)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
case "$2" in
|
case "$2" in
|
||||||
connections)
|
connections)
|
||||||
[ $# -gt 2 ] && usage 1
|
[ $# -gt 2 ] && usage 1
|
||||||
@ -972,7 +978,7 @@ case "$1" in
|
|||||||
exit $status
|
exit $status
|
||||||
;;
|
;;
|
||||||
dump)
|
dump)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
[ $# -eq 1 ] || usage 1
|
[ $# -eq 1 ] || usage 1
|
||||||
clear_term
|
clear_term
|
||||||
echo "Shorewall-$version Dump at $HOSTNAME - $(date)"
|
echo "Shorewall-$version Dump at $HOSTNAME - $(date)"
|
||||||
@ -1050,7 +1056,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
hits)
|
hits)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
[ $# -eq 1 ] || usage 1
|
[ $# -eq 1 ] || usage 1
|
||||||
clear_term
|
clear_term
|
||||||
echo "Shorewall-$version Hits at $HOSTNAME - $(date)"
|
echo "Shorewall-$version Hits at $HOSTNAME - $(date)"
|
||||||
@ -1112,7 +1118,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
logwatch)
|
logwatch)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
if [ $# -eq 2 ]; then
|
if [ $# -eq 2 ]; then
|
||||||
logwatch $2
|
logwatch $2
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
@ -1122,7 +1128,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
drop)
|
drop)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
[ $# -eq 1 ] && usage 1
|
[ $# -eq 1 ] && usage 1
|
||||||
mutex_on
|
mutex_on
|
||||||
while [ $# -gt 1 ]; do
|
while [ $# -gt 1 ]; do
|
||||||
@ -1135,7 +1141,7 @@ case "$1" in
|
|||||||
mutex_off
|
mutex_off
|
||||||
;;
|
;;
|
||||||
reject)
|
reject)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
[ $# -eq 1 ] && usage 1
|
[ $# -eq 1 ] && usage 1
|
||||||
mutex_on
|
mutex_on
|
||||||
while [ $# -gt 1 ]; do
|
while [ $# -gt 1 ]; do
|
||||||
@ -1148,7 +1154,7 @@ case "$1" in
|
|||||||
mutex_off
|
mutex_off
|
||||||
;;
|
;;
|
||||||
allow)
|
allow)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
[ $# -eq 1 ] && usage 1
|
[ $# -eq 1 ] && usage 1
|
||||||
mutex_on
|
mutex_on
|
||||||
while [ $# -gt 1 ]; do
|
while [ $# -gt 1 ]; do
|
||||||
@ -1162,7 +1168,7 @@ case "$1" in
|
|||||||
mutex_off
|
mutex_off
|
||||||
;;
|
;;
|
||||||
save)
|
save)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
1)
|
1)
|
||||||
@ -1236,7 +1242,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
iprange)
|
iprange)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
case $2 in
|
case $2 in
|
||||||
*.*.*.*-*.*.*.*)
|
*.*.*.*-*.*.*.*)
|
||||||
ip_range $2
|
ip_range $2
|
||||||
@ -1246,6 +1252,17 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
ipdecimal)
|
||||||
|
[ -n "$debugging" ] && set -x
|
||||||
|
case $2 in
|
||||||
|
*.*.*.*)
|
||||||
|
echo " $(decodeaddr $2)"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo " $(encodeaddr $2)"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
restore)
|
restore)
|
||||||
case $# in
|
case $# in
|
||||||
1)
|
1)
|
||||||
@ -1283,7 +1300,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
call)
|
call)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
#
|
#
|
||||||
# Undocumented way to call functions in /usr/share/shorewall/functions directly
|
# Undocumented way to call functions in /usr/share/shorewall/functions directly
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user