Page 1 of 1

iptables not working

Posted: Wed May 11, 2022 12:35 pm
by verus
Hi,

I installed a new Debian VPS (9.4) and I upgraded to 11.
After that I installed MyVesta and everything works except iptables.
In the portal, iptables is grayed out and I cannot start it (it does nothing).

When I perform v-update-firewall I get:

v-update-firewall
/usr/local/vesta/bin/v-update-firewall: line 173: /sbin/iptables-save: No such file or directory

It looks logical because there is no /sbin/iptables but there is a /USR/sbin/iptables-save

I didn't change anything because I don't want to break things but how can I fix this iptables working well on this installation (it is a new installation) ?
Thanks.

Re: iptables not working

Posted: Wed May 11, 2022 7:22 pm
by myVesta
apt update
apt install iptables-persistent

Re: iptables not working

Posted: Wed May 11, 2022 8:33 pm
by verus
thank you for the reply.
I did that but it still is the same. In the portal iptables is still greyed out.

Re: iptables not working

Posted: Wed May 11, 2022 9:47 pm
by myVesta
did you try to reboot the server?

Re: iptables not working

Posted: Wed May 11, 2022 10:36 pm
by verus
Yes I did.

I just did a brand new installation from scratch:
- VPS is installed with Debian 9
- Update from Debian 9 to Debian 11 (no errors) - rebooted
- installation of iptables-persistent - rebooted
- installation of MyVesta - rebooted

Login in MyVesta
iptables is greyed out

In cli I see this when I want to check the firewall:

root@shop:~# v-update-firewall
/usr/local/vesta/bin/v-update-firewall: line 173: /sbin/iptables-save: No such file or directory
root@shop:~# v-stop-service iptables
/usr/local/vesta/bin/v-stop-firewall: line 65: /sbin/iptables-save: No such file or directory

I could change these files but with a brand new installation, I don't think that is meant to be? And even then, iptables is greyed out in the Myvesta portal.

On another system that I installed with Debian 11 from scratch, I don't have this error and iptables is in /sbin so maybe it has something to do with the dist-upgrade?
But I have no other choice than starting from 9 because that is what is provided.

Thank you, Ph.

Re: iptables not working

Posted: Thu May 12, 2022 8:42 am
by myVesta
on server with problem, type:

Code: Select all

whereis iptables-save
maybe it's in some other folder, so you can just symlink it to /sbin

Re: iptables not working

Posted: Thu May 12, 2022 8:46 am
by myVesta
ahh, you already wrote it's in /usr/sbin

ok, try then:

Code: Select all

ln -s /usr/sbin/iptables-save /sbin/iptables-save

Re: iptables not working

Posted: Thu May 12, 2022 9:01 am
by verus
this is working now:

root@shop:~# v-update-firewall
root@shop:~# v-stop-service iptables
root@shop:~# v-start-service iptables

However, iptables in the myvesta portal (SERVER ==> iptables) is still greyed out.

Re: iptables not working

Posted: Thu May 12, 2022 9:24 am
by myVesta
but let's
v-update-firewall
be last command you run.

and do
iptables -L -n
so we can see if rules are there