• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Lost server access

Northfolk

New Pleskian
Hello everyone,

So let me explain my case, i'm currently working on a plesk webserver for linux. I Have SSH root access, and r"ecently we moved our workspace to another place and because of our ip policy we could not access Plesk via browser. So i tried to give access to our new ip to the plesk panel via comand line (ssh root acces) but i used the wrong one and used the command line to add our ip adresse to the server and now we can't access anything, even SSH.

Could someone help me? How can i get back SSH access?

The line i used :

plesk bin ipmanage --create 00.00.00.00 -type shared -mask 255.255.255.0 -interface "eth0"
 
I juste saw we i don't have acess to website on the server either. Anybody have any idea of how i can get access back?
We have our own DNS servers and they tell me that the ip ok the one that should be and not our own one.

If that can help, oi did not added 00.00.00.00 as ip but our own, i typed this one for obvious security reason.
 
OK, i have access from another IP adress, is that possible that command line blocked me instead of addind an ip?
 
The plesk "ipmanage" program only manages IP addresses in Plesk, e.g. when you have several IP addresses associated with your server and want to provide some of them to customers in Plesk. It has nothing to do with firewall or iptables (fail2ban) operations that could block SSH access. Even if you created a nonsense record with "ipmanage" it does not influence your access to the server.

If you were blocked from accessing your host, it is most likely due to Fail2Ban that has detected unauthorized logins in some log files or an excessive number of similar requests within a short time. In that case, the easiest way to gain access again is to use another source IP (e.g. another network, proxy or similar) and lift the ban with the Fail2Ban module.
 
Neet, will try that, i was currently wondering why i have acces from my phone if i scrambled two ip adress together.

Will try that and give you a feedback.

Thank you sir.
 
Ok, so here is a Feedback in case someone do the same mistake than me.

I used 2 different IP, the one that I blocked (i will name it 1) and another one (i will name it 2)

I used a different ip for SSH connexion, then tried to add the ip 1 but did not worked (used those command lines: "plesk db "INSERT INTO cp_access (type, netaddr, netmask) VALUES ('deny' , 'ip1', '255.255.255.255')"" but no access to the plesk Panel.

Tried "plesk db "INSERT INTO cp_access (type, netaddr, netmask) VALUES ('allow' , '203.0.113.2', '255.255.255.255')"" did not worked either.

Then i tried to add those command lines with ip2 but did not worked either.

Then, tried to disable the ip restriction policy with : "plesk db "DELETE FROM cp_access"" and "plesk db "UPDATE misc SET val='allow' WHERE param='access_policy'"" who actually worked as intended.

Access to Plesk Admin Panel with ip2

As said above, i tried to unban ip1 from Fail2Ban but problem is ip1 is not banned. So i whitelisted it with no results.

As said in my 1st post, i added ip1 in ipmanage so i checked if the command actually worked. Is was the case, so i delete it from the ip adresses and i got back the access with ip1.

My tought about that are, because i added a shared ip it was imposiible for me connect from that ip and be that ip at the same time. I'm actually learning it for the moment so i can't do more to enhance the plesk experience and if someone can explain to me why i encontered that issue, i would be glad.

Also, excuse my english, it is not my mother tongue.

Thank you Peter Debik for the edvice and explanations, it helped a lot.
 
Back
Top