0

I would like to install apache, php and mysql on Ubuntu 22.04 toolbox which is running in a Fedora 39 desktop VM. I am following the steps instructions provided in this link, but is seems to have some problem trying to set the ports in the firewall; when I run

⬢[lab@toolbox lab]$ sudo ufw allow in "Apache"
WARN: initcaps
[Errno 2] iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Permission denied (you must be root)

Besides,

$ sudo ufw status

outputs error:

⬢[lab@toolbox lab]$ sudo ufw status
ERROR: problem running iptables: iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Permission denied (you must be root)
6
  • Try sudo -i followed by ufw status . Is the error still present?
    – eyoung100
    Mar 13 at 21:24
  • @eyoung100 yes, it gives the same error about Iptables. ⬢[lab@toolbox lab]$ sudo -i ufw status ERROR: problem running iptables: iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Permission denied (you must be root) . I also tested it with su -.
    – pablo
    Mar 13 at 21:49
  • Is the rules file missing? See here. Otherwise, a quick Google search returns that an iptables downgrade is needed.
    – eyoung100
    Mar 13 at 22:28
  • @eyoung100 Thanks. I have the configuration file /etc/ufw/applications.d/apache2-utils.ufw.profile. With respect to the downgrade of Iptables I am not sure why it is needed. I am not sure but is it possible that Toolbox that it uses Podman is launching container of Ubuntu with access to the home of the user but without any privilege e.g to manipulate iptables to to make any other low staff like installing libvrt library.
    – pablo
    Mar 14 at 0:10
  • @pablo, the sudo -i and ufw status that eyoung100 asked you to run should be two separate commands. You ran them together as a single command Mar 14 at 8:03

1 Answer 1

1

You are in toolbox (a container) which doesn't have its own networking stack. Since toolbox runs in host networking mode, it should inherit whatever firewall rules you set outside toolbox.

Have you tried running sudo ufw allow in "Apache" outside toolbox?

2
  • thanks. It tells that the command is not found. The fedora iptables must not be in the system. However, it is a new installation.
    – pablo
    Mar 14 at 16:51
  • You could either install iptables/ufw outside toolbox and use it, or you could just proceed without configuring it: if there's no firewall installed, all ports should already be allowed in, and you should be able to continue the guide.
    – Cadence
    Mar 14 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .