iptables not working

Post Reply
verus
Posts: 9
Joined: Thu May 05, 2022 2:01 pm

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.
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

apt update
apt install iptables-persistent
verus
Posts: 9
Joined: Thu May 05, 2022 2:01 pm

thank you for the reply.
I did that but it still is the same. In the portal iptables is still greyed out.
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

did you try to reboot the server?
verus
Posts: 9
Joined: Thu May 05, 2022 2:01 pm

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.
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

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
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

ahh, you already wrote it's in /usr/sbin

ok, try then:

Code: Select all

ln -s /usr/sbin/iptables-save /sbin/iptables-save
verus
Posts: 9
Joined: Thu May 05, 2022 2:01 pm

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.
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

but let's
v-update-firewall
be last command you run.

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