IPTABLES = "iptables"
IP6TABLES = "ip6tables"
-#IPTABLES = "xtables -4"
-#IP6TABLES = "xtables -6"
+EBTABLES = "ebtables"
IPTABLES_SAVE = "iptables-save"
IP6TABLES_SAVE = "ip6tables-save"
+EBTABLES_SAVE = "ebtables-save"
#IPTABLES_SAVE = ['xtables-save','-4']
#IP6TABLES_SAVE = ['xtables-save','-6']
command = IPTABLES_SAVE
elif splitted[0] == IP6TABLES:
command = IP6TABLES_SAVE
+ elif splitted[0] == EBTABLES:
+ command = EBTABLES_SAVE
path = os.path.abspath(os.path.curdir) + "/iptables/" + EXECUTEABLE
command = path + " " + command
:param lineno: line number being tested (used for print_error purposes)
'''
global log_file
- if cmd.startswith('iptables ') or cmd.startswith('ip6tables '):
+ if cmd.startswith('iptables ') or cmd.startswith('ip6tables ') or cmd.startswith('ebtables '):
cmd = os.path.abspath(os.path.curdir) + "/iptables/" + EXECUTEABLE + " " + cmd
print >> log_file, "command: %s" % cmd
iptables = IP6TABLES
elif "libxt_" in filename:
iptables = IPTABLES
+ elif "libebt_" in filename:
+ # only supported with nf_tables backend
+ if EXECUTEABLE != "xtables-nft-multi":
+ return 0, 0
+ iptables = EBTABLES
else:
# default to iptables if not known prefix
iptables = IPTABLES