Host firewall (firewalld)¶
Firewalld with Docker in IsardVDI¶
If you are upgrading from a previous version where firewalld handled NAT, the previous configuration was:
- firewalld service
docker0interface in the public zone- Masquerade activated (NAT)
- docker service
- Docker with iptables disabled (
/etc/docker/daemon.json)
- Docker with iptables disabled (
With the current source code, the system will continue to work, but you must modify the configuration as follows:
- firewalld service
firewall-cmd --zone=public --remove-interface docker0 --permanentfirewall-cmd --remove-masquerade --permanent
- docker service
- Remove
/etc/docker/daemon.jsonor modify it to activate iptables:{ "iptables": true }
- Remove
Restart the firewalld service: systemctl restart firewalld and restart Docker: systemctl restart docker
With this new configuration, the isard-portal container will see the real client IP, and Docker will handle opening and closing ports.
In cloud infrastructure configurations (docker-compose.hypervisor.yml), remote hypervisors must open port 2022 at the Docker level in the isard-hypervisor container. This is not automated yet; you must edit the configuration manually. Alternatively, forward that port inside the isard-hypervisor container at the firewalld level:
firewall-cmd --add-forward-port=port=2022:proto=tcp:toport=2022:toaddr=172.31.255.17
NOTE: 172.31.255 is the default value of DOCKER_NET in isardvdi.cfg, and .17 is the address of the isard-hypervisor container. Modify the address accordingly if you changed DOCKER_NET.
Also, in local infrastructure configurations (docker-compose.hypervisor-standalone.yml), you must forward port 2022 and the full video ports (since this configuration does not include isard-video):
firewall-cmd --add-forward-port=port=2022:proto=tcp:toport=2022:toaddr=172.31.255.17firewall-cmd --add-forward-port=port=5900-7899:proto=tcp:toport=5900-7899:toaddr=172.31.255.17