Control Web Panel
WebPanel => CentOS 6 Problems => Topic started by: rs on December 06, 2018, 01:57:58 AM
-
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...
-
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?..
-
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...
-
Finally, I solved the problem by cleaning the blacklist of the firewall.