I previously have firehol installed on a 20.04 (server A), and it runs just 
fine (have encountered #264 of course).
Yesterday, I tried to install firehol on another 20.04 (server B), and 
encountered error:

user@B:~$ sudo firehol try
 WARNING: error initializing iptables: IPv4 disabled
 WARNING: error initializing ip6tables: IPv6 disabled
 ERROR: Neither IPv4 nor IPv6 is available - exiting

Both server A and B user install.config:
$ grep iptables /usr/lib/firehol/install.config
IPTABLES_CMD="/sbin/iptables"
IPTABLES_RESTORE_CMD="/sbin/iptables-restore"
IPTABLES_SAVE_CMD="/sbin/iptables-save"

I I found out the difference is that on server A, there is a default config 
file:
root@A:~# grep iptables /etc/firehol/firehol-defaults.conf | grep -v \#
IPTABLES_CMD="/usr/sbin/iptables"
IPTABLES_SAVE_CMD="/usr/sbin/iptables-save"
IPTABLES_RESTORE_CMD="/usr/sbin/iptables-restore"

So, the correct command is listed in firehol-defaults.conf

I tried to list the file dates:

root@A:~# ls -lah /usr/lib/firehol/
drwxr-xr-x  2 root root 4.0K Oct 10  2019 .
drwxr-xr-x 96 root root  12K Mar  9 03:06 ..
-rwxr-xr-x  1 root root 357K Jun 22  2020 firehol
-rwxr-xr-x  1 root root 102K Nov  4  2017 fireqos
-rw-r--r--  1 root root 2.1K Nov  4  2017 functions.common
-rw-r--r--  1 root root 2.3K Nov  4  2017 install.config

root@A:~# ls -lah /etc/firehol
drwxr-xr-x   4 root root 4.0K Oct 13  2019 .
drwxr-xr-x 181 root root  12K Mar 10 03:21 ..
-rw-r--r--   1 root root 2.0K Mar  8 04:26 firehol.conf
-rw-r--r--   1 root root  22K Jun 22  2020 firehol-defaults.conf
-rw-r--r--   1 root root  190 Sep 20  2017 fireqos.conf

While I cannot be sure whether I touched the file or not, it seems
highly likely to me that the firehol-defaults.conf could come from a
installation back in the 2020. Maybe somehow the file got lost in the
packaging process? Or maybe I installed firehol through source (I doubt
that, yet I really don't know)?

It is suggested by firehol website that firehol-defaults.conf should better be 
included:
https://firehol.org/firehol-manual/firehol-defaults-conf/
Quote "
From FireHOL 3 upwards, variables which control FireHOL behaviour are held in a 
separate file: /etc/firehol/firehol-defaults.conf.

Some variables can also be set in the main firehol.conf file but that is
not recommended, since they may be used before the main configuration is
processed.

FireHOL also sets some variables before processing the configuration file which 
you can use as part of your configuration. These are described in 
firehol.conf(5).
"

Just my two cents.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1891751

Title:
  firehol ubuntu 20.04 ERROR: Neither IPv4 nor IPv6 is available -
  exiting

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/firehol/+bug/1891751/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to