|
|
@@ -75,6 +75,10 @@ do_not_log_action () {
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
+translate_iptables_rule(){
|
|
|
+ echo $* | sed -e 's/'$IPTABLES_ADD'/-A/g' -e 's/'$IPTABLES_INSERT'/-I/g' -e 's/'$IPTABLES_SET_POLICY'/-P/g'
|
|
|
+}
|
|
|
+
|
|
|
###############################################################
|
|
|
# Firewall actions function definition
|
|
|
###############################################################
|
|
|
@@ -139,11 +143,11 @@ do_exec () {
|
|
|
echo "Nothing to be done for $1"
|
|
|
;;
|
|
|
esac
|
|
|
- if [ ${verbose} -ge 1 ] ; then
|
|
|
- echo $IP_TABLES $it_table $it_option $it_command
|
|
|
- fi
|
|
|
if ! $IP_TABLES $it_table -C $it_command > /dev/null 2>&1
|
|
|
then
|
|
|
+ if [ ${verbose} -ge 1 ] ; then
|
|
|
+ echo $IP_TABLES $it_table $it_option $it_command
|
|
|
+ fi
|
|
|
$IP_TABLES $it_table $it_option $it_command
|
|
|
fi
|
|
|
}
|