Failed to apply network settings - file /sbin/iptables doesn't exist for bluetooth xubuntu 20.04 [duplicate]

On My notebook omen 17-cbO247 core i7, I recently upgrade my system from Ubuntu 18.04 to Ubuntu 20.04.

It works almost perfect, but after rebooting the system, I’m getting the following message:

Failed to apply network settings
you might not be able to connect to the Bluetooth network via this machine

g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.Failed: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/blueman/main/DbusService.py”, line 124, in _handle_method_call
ok(method(*args))
File “/usr/lib/python3/dist-packages/blueman/plugins/mechanism/Network.py”, line 57, in _reload_network
nc.apply_settings()
File “/usr/lib/python3/dist-packages/blueman/main/NetConf.py”, line 384, in apply_settings
self.del_ipt_rules()
File “/usr/lib/python3/dist-packages/blueman/main/NetConf.py”, line 329, in del_ipt_rules
call(["/sbin/iptables", “-t”, table, “-D”, chain] + rule.split(" "))
File “/usr/lib/python3.8/subprocess.py”, line 340, in call
with Popen(*popenargs, **kwargs) as p:
File “/usr/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.8/subprocess.py”, line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘/sbin/iptables’
(0)

Please help me to solve the problem.


Solution 1:

You miss the /sbin/iptables executable. On fresh installation of 20.04 LTS it is a symlink which is provided or created by iptables package installer. The full link chain is /sbin/iptables/etc/alternatives/iptables/usr/sbin/iptables-legacy.

So you need to reinstall the iptables package by

sudo apt-get install --reinstall iptables

and then restart BlueMan or reboot.