I am getting an error message on bootup saying there is no iptables file
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'
I have run apt-get iptables
iptables -L -v says they are there.
But still no joy
Any ideas?
Hi
And is the file there ?
I see that this should be a symbolic link to a other file in other location :
ls -lt /sbin/iptables*
lrwxrwxrwx 1 root root 20 Apr 8 17:29 /sbin/iptables-legacy -> xtables-legacy-multi
lrwxrwxrwx 1 root root 20 Apr 8 17:29 /sbin/iptables-legacy-restore -> xtables-legacy-multi
lrwxrwxrwx 1 root root 20 Apr 8 17:29 /sbin/iptables-legacy-save -> xtables-legacy-multi
lrwxrwxrwx 1 root root 17 Apr 8 17:29 /sbin/iptables-nft -> xtables-nft-multi
lrwxrwxrwx 1 root root 17 Apr 8 17:29 /sbin/iptables-nft-restore -> xtables-nft-multi
lrwxrwxrwx 1 root root 17 Apr 8 17:29 /sbin/iptables-nft-save -> xtables-nft-multi
lrwxrwxrwx 1 root root 34 Apr 8 17:29 /sbin/iptables-restore -> /etc/alternatives/iptables-restore
lrwxrwxrwx 1 root root 17 Apr 8 17:29 /sbin/iptables-restore-translate -> xtables-nft-multi
lrwxrwxrwx 1 root root 31 Apr 8 17:29 /sbin/iptables-save -> /etc/alternatives/iptables-save
lrwxrwxrwx 1 root root 17 Apr 8 17:29 /sbin/iptables-translate -> xtables-nft-multi
lrwxrwxrwx 1 root root 26 Apr 8 17:29 /sbin/iptables -> /etc/alternatives/iptables
-rwxr-xr-x 1 root root 7057 Feb 28 2020 /sbin/iptables-apply
Do you have the same thing your side ?
Hi Olek
No they are not in /sbin
I get no file or directory
Maybe try to install iptables with sudo apt install iptables
We will see what will happen
I have just done that, I now have a file in /sbin called ip
tried a re-start problem still there.
here are the stat for ip:-
sonyuser@SonyVaio:/sbin$ stat ip
File: ip -> /bin/ip
Size: 7 Blocks: 0 IO Block: 4096 symbolic link
Device: 805h/2053d Inode: 15351488 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-04-24 14:05:19.616024527 +0100
Modify: 2020-02-13 17:21:59.000000000 +0000
Change: 2021-03-21 18:26:19.273975568 +0000
Birth: -
and this command, what it is printing out your side ?
no such file or directory
Can you run this commands and share the output ?
dpkg -L iptables | grep iptables
if the result do not output something, you can try :
sudo apt-get install --reinstall iptables
sonyuser@SonyVaio:~$ dpkg -L iptables | grep iptables
/usr/sbin/iptables-apply
/usr/share/doc/iptables
/usr/share/doc/iptables/INCOMPATIBILITIES
/usr/share/doc/iptables/README.Debian
/usr/share/doc/iptables/copyright
/usr/share/doc/iptables/html
/usr/share/doc/iptables/html/NAT-HOWTO-1.html
/usr/share/doc/iptables/html/NAT-HOWTO-10.html
/usr/share/doc/iptables/html/NAT-HOWTO-11.html
/usr/share/doc/iptables/html/NAT-HOWTO-2.html
/usr/share/doc/iptables/html/NAT-HOWTO-3.html
/usr/share/doc/iptables/html/NAT-HOWTO-4.html
/usr/share/doc/iptables/html/NAT-HOWTO-5.html
/usr/share/doc/iptables/html/NAT-HOWTO-6.html
/usr/share/doc/iptables/html/NAT-HOWTO-7.html
/usr/share/doc/iptables/html/NAT-HOWTO-8.html
/usr/share/doc/iptables/html/NAT-HOWTO-9.html
/usr/share/doc/iptables/html/NAT-HOWTO.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-1.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-10.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-11.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-2.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-3.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-4.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-5.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-6.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-7.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-8.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-9.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO.html
/usr/share/iptables
/usr/share/iptables/iptables.xslt
/usr/share/man/man1/iptables-xml.1.gz
/usr/share/man/man8/iptables-apply.8.gz
/usr/share/man/man8/iptables-extensions.8.gz
/usr/share/man/man8/iptables-restore.8.gz
/usr/share/man/man8/iptables-save.8.gz
/usr/share/man/man8/iptables.8.gz
/usr/bin/iptables-xml
/usr/sbin/iptables-legacy
/usr/sbin/iptables-legacy-restore
/usr/sbin/iptables-legacy-save
/usr/sbin/iptables-nft
/usr/sbin/iptables-nft-restore
/usr/sbin/iptables-nft-save
/usr/sbin/iptables-restore-translate
/usr/sbin/iptables-translate
/usr/share/doc/iptables/NEWS.Debian.gz
/usr/share/doc/iptables/changelog.Debian.gz
/usr/share/man/man8/iptables-legacy-restore.8.gz
/usr/share/man/man8/iptables-legacy-save.8.gz
/usr/share/man/man8/iptables-legacy.8.gz
/usr/share/man/man8/iptables-nft-restore.8.gz
/usr/share/man/man8/iptables-nft-save.8.gz
/usr/share/man/man8/iptables-nft.8.gz
/usr/share/man/man8/iptables-restore-translate.8.gz
/usr/share/man/man8/iptables-translate.8.gz
sonyuser@SonyVaio:~$
Ok, try this :
ln -s /etc/alternatives/iptables /sbin/iptables
ln -s /etc/alternatives/iptables /usr/sbin/iptables
Jobs a good 'un
The first command did the trick. iptables are now sitting in /sbin
Just re-booted and no problems.
Thank you very much for sorting this out for me