Author Topic: Can't connect to my server after using logrotate /etc/logrotate.conf  (Read 6692 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
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...

Offline
*
Re: Can't connect to my server after using logrotate /etc/logrotate.conf
« Reply #1 on: December 06, 2018, 02:26:30 AM »
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:

Code: [Select]
-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?..

Offline
*
Re: Can't connect to my server after using logrotate /etc/logrotate.conf
« Reply #2 on: December 06, 2018, 08:20:19 PM »
If I disable Firewall from the CWP I can see result of iptables -S like that:

Code: [Select]
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:
Code: [Select]
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

I have tried to remove this part:
Code: [Select]
-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:
Code: [Select]
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...

Offline
*
Re: Can't connect to my server after using logrotate /etc/logrotate.conf
« Reply #3 on: December 06, 2018, 10:14:57 PM »
Finally, I solved the problem by cleaning the blacklist of the firewall.