New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Can't connect to my server after using logrotate /etc/logrotate.conf

Started by rs, December 06, 2018, 01:57:58 AM

Previous topic - Next topic

rs

I have run command
logrotate /etc/logrotate.conf it was defult logrotate.conf but after that my server stop working can't connect through ssh. I am scared...

rs

I have connected through VNC to the server.
Right strange things happened. if I disable iptables I can connect to the server but the command
iptables -S
showing me this result:


-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT


But since I'm trying to enable iptables I can't connect to the server.
Is that possible that default logrotate configuration file destroyed something important?..

rs

If I disable Firewall from the CWP I can see result of iptables -S like that:


iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited


But in the other server with CWP if I disable firewall from the panel the result is just that rules:

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT


I have tried to remove this part:

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited


Using iptable -D

But after enabling firewal I am again loosing access to my server, also if I am disabling firewall again I am getting the same rules:

iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

Please help me to understand what´s going on...

rs

Finally, I solved the problem by cleaning the blacklist of the firewall.