Page 1 of 1

iptables stopped after installed

Posted: Thu Apr 18, 2019 6:09 pm
by edica
I installed Vesta, but iptables does not start. What can it be?
VPS Centos 7.6

Re: iptables stopped after installed

Posted: Thu Apr 18, 2019 7:20 pm
by dreiggy
First check if iptables are installed:

Code: Select all

yum list installed | grep iptables
You too may check this:

Code: Select all

systemctl status iptables.service -l

Re: iptables stopped after installed

Posted: Thu Apr 18, 2019 11:16 pm
by edica
Gave this:

iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Qui 2019-04-18 23:05:21 UTC; 9min ago
Main PID: 159 (code=exited, status=1/FAILURE)

Abr 18 23:05:21 testhost iptables.init[159]: iptables: Applying firewall rules: iptables-restore: line 14 failed
Abr 18 23:05:21 testhost iptables.init[159]: [FAILED]

Re: iptables stopped after installed

Posted: Tue Apr 23, 2019 5:57 pm
by dreiggy
Try to flush iptables rules: sudo iptables -F
And then restart iptables.

More info:
https://www.cyberciti.biz/tips/linux-ip ... rules.html

Re: iptables stopped after installed

Posted: Fri Apr 26, 2019 2:28 pm
by edica
I was able to activate the iptables service. But iptables in Vesta is stopped.

Re: iptables stopped after installed

Posted: Fri Apr 26, 2019 3:15 pm
by dreiggy
Check if fail2ban is running:

Code: Select all

service fail2ban status

Re: iptables stopped after installed

Posted: Fri Apr 26, 2019 4:12 pm
by edica
service fail2ban status :

Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled)
Active: active (running) since Sex 2019-04-26 13:10:32 BRT; 42s ago
Docs: man:fail2ban(1)
Process: 554 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=0/SUCCESS)
Process: 527 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)
Main PID: 705 (fail2ban-server)
CGroup: /system.slice/fail2ban.service
└─705 /usr/bin/python2 -s /usr/bin/fail2ban-server -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban....

Abr 26 13:07:43 testhost fail2ban-client[2861]: 2019-04-26 13:07:43,444 fail2ban.server [2862]: INFO St...0.9.7
Abr 26 13:07:43 testhost fail2ban-client[2861]: 2019-04-26 13:07:43,445 fail2ban.server [2862]: INFO St... mode
Abr 26 13:09:55 testhost fail2ban-client[6464]: Shutdown successful
Abr 26 13:10:30 testhost fail2ban-client[554]: 2019-04-26 13:10:30,347 fail2ban.server [666]: INFO Star...0.9.7
Abr 26 13:10:30 testhost fail2ban-client[554]: 2019-04-26 13:10:30,348 fail2ban.server [666]: INFO Star... mode
Hint: Some lines were ellipsized, use -l to show in full.

Re: iptables stopped after installed

Posted: Fri Apr 26, 2019 4:17 pm
by edica
Vesta installation of this problem:

Note: Forwarding request to 'systemctl enable iptables.service'.
Note: Forwarding request to 'systemctl disable iptables.service'.
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.
Note: Forwarding request to 'systemctl enable iptables.service'.
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
Note: Forwarding request to 'systemctl disable iptables.service'.
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.
Note: Forwarding request to 'systemctl enable iptables.service'.
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
Note: Forwarding request to 'systemctl disable iptables.service'.
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.