Page 1 of 1

Problem with IPTables/UFW

Posted: Thu Jun 27, 2019 11:55 am
by xCEZAREx
Hi!
Have fresh installed and rebooted server with VestaCP. Iptables row at VestaCP Server`s tab look like stopped...

When i try from command line to "service iptables start/restart/stop/status" getting this: Unit iptables.service not found.

But...if try to run from VestaCP Server`s tab, its doing very slowly, but after 1 - 2 minutes IPTbales looks like started and working normally... but... after that i have troubles with "sudo -s" - sudo: unable to resolve host <wrong-hostname>: Resource temporarily unavailable

I wanna try to set correct hosts and hostname by edit /etc/hosts and "hostnamesctl set-hostname <correct-hostname>". Thats solutions make me fast with "sudo -s" and restarting iptables trough VestaCP Server`s tab.

And finally... after rebooting - iptables stoped again...

What`s wrong with iptables?


p.s.
its not my first expirience with VCP, but its first time when i have troubles with firewall

Re: Problem with IPTables/UFW

Posted: Thu Jun 27, 2019 5:24 pm
by skamasle
Hi

You miss the most important information

What system you use in your server ?

Re: Problem with IPTables/UFW

Posted: Thu Jun 27, 2019 9:18 pm
by xCEZAREx
huh, yep )

Ubuntu 18.04.2

have 5 servers with 18.04, but this is first time trouble...

Re: Problem with IPTables/UFW

Posted: Fri Jul 05, 2019 8:00 am
by Tim25N
Hey!
I had the same problem. Thanks. I fixed it.

Re: Problem with IPTables/UFW

Posted: Thu Aug 01, 2019 1:16 pm
by roncooletz214
Tim25N wrote:
Fri Jul 05, 2019 8:00 am
Hey!
I had the same problem. Thanks. I fixed it.
Can you share to us how you were able to fix it?

Re: Problem with IPTables/UFW

Posted: Sun Sep 08, 2019 8:43 pm
by itsolon
please share with us.. we have the same problem

Re: Problem with IPTables/UFW

Posted: Mon Sep 09, 2019 8:02 pm
by wilzony
Tim25N wrote:
Fri Jul 05, 2019 8:00 am
Hey!
I had the same problem. Thanks. I fixed it.
Hello, may I know what did you do to finally fix it? I'm having the same problem after I reboot.

Re: Problem with IPTables/UFW

Posted: Thu Oct 22, 2020 7:32 pm
by belce666
Hello everyone. Im just installed a VestaCP on a OHV VPS. Ubuntu 18.04. And after a few reboots, iptables is stopped at every reboot. I have to go to admin user, and start/restart iptables and done. When iptables is down, the /webmail of any domain don't work (and im sure many other things will not work). Ubuntu have ufw but as others said: iptables it is not installed as service, but you can show their rules. Does anyone knows how to fix this?

thank you.

PD: found a russian? post, i cant understand what it says, but found 2 lines.

apt-get install ifupdown
/usr/local/vesta/bin/v-update-firewall

I'm not a Linux expert, but after run these lines and reboot, the VPS (a testing one) started ok! iptables is on on the VestaCP web console. Now, i have a rule that must block ICMP and sometimes works, and almost time it did not... so i can ping the IP or name of my VPS. Now, every time I reboot, Iptables is started and ICMP blocked!!! But, if I turn off Iptables from Vesta Panel and them turn on again, and ICMP is not blocked any more... like Iptables isn't working. But i know if iptables is off, many of resources/services will not work.

It is possible that exist an inconsistency between ufw and iptables?

Re: Problem with IPTables/UFW

Posted: Fri Oct 23, 2020 6:19 pm
by belce666
ok. its me again...

In my case the problem was:

Ubuntu uses ufw, and VestaCp installs iptables. So, i disabled ufw with:

ufw disable
then check that with:
ufw status
and i saw:
Status: inactive

Thats all. Now every time I reboot, iptables starts ok with VestaCP.

Re: Problem with IPTables/UFW

Posted: Sat Nov 28, 2020 9:00 am
by tabeautybexr
we have the same problem