@@ -861,6 +861,10 @@ let nbd_firewall_config_script =
861
861
862
862
let firewall_port_config_script = ref " /etc/xapi.d/plugins/firewall-port"
863
863
864
+ let firewall_cmd = ref " /usr/bin/firewall-cmd"
865
+
866
+ let firewall_cmd_wrapper = ref " /usr/bin/firewall-cmd-wrapper"
867
+
864
868
let nbd_client_manager_script =
865
869
ref " /opt/xensource/libexec/nbd_client_manager.py"
866
870
@@ -1317,6 +1321,12 @@ let ssh_monitor_service = ref "xapi-ssh-monitor"
1317
1321
1318
1322
let ssh_auto_mode_default = ref true
1319
1323
1324
+ (* Firewall backend to use. iptables in XS 8, firewalld in XS 9. *)
1325
+ let firewall_backend = ref " firewalld"
1326
+
1327
+ (* For firewalld, if dynamic control firewalld service. *)
1328
+ let dynamic_control_firewalld_service = ref true
1329
+
1320
1330
(* Fingerprint of default patch key *)
1321
1331
let citrix_patch_key =
1322
1332
" NERDNTUzMDMwRUMwNDFFNDI4N0M4OEVCRUFEMzlGOTJEOEE5REUyNg=="
@@ -1762,12 +1772,6 @@ let other_options =
1762
1772
, (fun () -> string_of_bool ! validate_reusable_pool_session)
1763
1773
, " Enable validation of reusable pool sessions before use"
1764
1774
)
1765
- ; ( " ssh-auto-mode"
1766
- , Arg. Bool (fun b -> ssh_auto_mode_default := b)
1767
- , (fun () -> string_of_bool ! ssh_auto_mode_default)
1768
- , " Defaults to true; overridden to false via \
1769
- /etc/xapi.conf.d/ssh-auto-mode.conf(e.g., in XenServer 8)"
1770
- )
1771
1775
; ( " vm-sysprep-enabled"
1772
1776
, Arg. Set vm_sysprep_enabled
1773
1777
, (fun () -> string_of_bool ! vm_sysprep_enabled)
@@ -1778,6 +1782,17 @@ let other_options =
1778
1782
, (fun () -> string_of_float ! vm_sysprep_wait)
1779
1783
, " Time in seconds to wait for VM to recognise inserted CD"
1780
1784
)
1785
+ ; ( " firewall-backend"
1786
+ , Arg. Set_string firewall_backend
1787
+ , (fun () -> ! firewall_backend)
1788
+ , " Firewall backend. iptables (in XS 8) or firewalld (in XS 9 or later XS \
1789
+ version)"
1790
+ )
1791
+ ; ( " dynamic-control-firewalld-service"
1792
+ , Arg. Bool (fun b -> dynamic_control_firewalld_service := b)
1793
+ , (fun () -> string_of_bool ! dynamic_control_firewalld_service)
1794
+ , " Enable dynamic control firewalld service"
1795
+ )
1781
1796
]
1782
1797
1783
1798
(* The options can be set with the variable xapiflags in /etc/sysconfig/xapi.
@@ -1912,10 +1927,14 @@ module Resources = struct
1912
1927
, " Executed after NBD-related networking changes to configure the \
1913
1928
firewall for NBD"
1914
1929
)
1915
- ; ( " firewall-port-config"
1916
- , firewall_port_config_script
1917
- , " Executed when starting/stopping xapi-clusterd to configure firewall \
1918
- port"
1930
+ ; ( " firewall-cmd"
1931
+ , firewall_cmd
1932
+ , " Executed when enable/disable a service on a firewalld zone"
1933
+ )
1934
+ ; ( " firewall-cmd-wrapper"
1935
+ , firewall_cmd_wrapper
1936
+ , " Executed when enable/disable a service on a firewalld zone and \
1937
+ interface"
1919
1938
)
1920
1939
; ( " nbd_client_manager"
1921
1940
, nbd_client_manager_script
0 commit comments