feat(xml): Tie it all together by generating intro ip(6)tables targets
This commit is contained in:
parent
35e6f80243
commit
74a6f42171
@ -554,5 +554,20 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
log.info(f"No source address given. Rules will apply to all sources.")
|
log.info(f"No source address given. Rules will apply to all sources.")
|
||||||
|
|
||||||
# arg_allow_sources = resolve_addresses(arg_allow_list)
|
add_fw_rule_to_xml(config,
|
||||||
# gen_fw_rule_xml(arg_allow_sources)
|
section,
|
||||||
|
target=config.get(section, "target"),
|
||||||
|
ports=config.getlist(section, "ports"),
|
||||||
|
proto=config.get(section, "proto"))
|
||||||
|
for arg_address_family in ["ipv4", "ipv6"]:
|
||||||
|
if rules_count(arg_address_family):
|
||||||
|
add_rule_elem(
|
||||||
|
arg_address_family,
|
||||||
|
0,
|
||||||
|
"ACCEPT",
|
||||||
|
arg_state="ESTABLISHED,RELATED")
|
||||||
|
add_firewall_shim(get_phy_nics())
|
||||||
|
|
||||||
|
write_new_fwd_direct_xml(config)
|
||||||
|
if config.getboolean(configparser.DEFAULTSECT, "restart_firewalld_after_change"):
|
||||||
|
restart_systemd_firewalld()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user