I am using lxd version 3.16, created a container using mcvlan.
After installing my required packages on the container I setup ufw accordingly. All commands below are run in the container
ufw enable Firewall is active and enabled on system startup
Upon doing so required ports are open and I can interact accordingly. But when I restart lxd container or the host system is rebooted. UFW gets inactive and I have to run manually each time by exec the following command:
systemctl status ufw shows:
● ufw.service - Uncomplicated firewall Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2019-08-14 07:55:25 PKT; 20min ago Docs: man:ufw(8) Process: 64 ExecStart=/lib/ufw/ufw-init start quiet (code=exited, status=0/SUCCESS) Main PID: 64 (code=exited, status=0/SUCCESS)
cat /etc/ufw/ufw.conf # /etc/ufw/ufw.conf # # Set to yes to start on boot. If setting this remotely, be sure to add a rule # to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp' ENABLED=yes # Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'. # See 'man ufw' for details.
Kindly help on how to keep ufw running after reboot of container of host.