I locked myself out with my firewall
Locked yourself out with your firewall or a network change? Recovery goes through support. This is how you prevent it next time.
By Hermie Updated
If you've locked yourself out, you can't get back in yourself. Recovery currently goes through support: open a ticket. If you caused it yourself, that's paid work at €30 per quarter hour excl. VAT.
Recovery through support
- Open a ticket.
- Say which VPS it's about.
- Explain what you changed, for example which firewall rule or which network setting.
The more you tell us, the faster support can revert the change.
See also My VPS is unreachable: what can I check myself?
How to prevent it
ufw
Allow SSH first and only then turn on the firewall:
sudo ufw allow OpenSSHsudo ufw enable
If you use a different SSH port, allow that port instead, for example sudo ufw allow 2222/tcp.
Network settings with netplan
Use sudo netplan try instead of sudo netplan apply. With netplan try your changes are rolled back automatically if you don't confirm them within a short time. So if you lose your connection, it comes back by itself.
Windows
Always keep Remote Desktop (RDP) allowed in Windows Firewall. If you block RDP, you can no longer reach your VPS.
Keep a second session open
When you change the firewall or SSH settings, keep your current session open. Test in a second window whether you can still log in. If you can't, you can still revert it in the first session.
Did this article help you?
Related articles
Can I send email from my VPS?
Yes: port 25 for outgoing mail is currently open by default on your VPS. These tips improve the chance that your mail arrives properly.
Can I test a VPS for free first?
No, we have no trial periods. The minimum term is one month, and you can cancel monthly.
Can I get extra IPv4 addresses for my VPS?
Yes, you request extra IPv4 addresses for your VPS with a ticket. Both single addresses and a subnet are possible.
Can I run Pterodactyl or a game server on my VPS?
Yes, you can run Pterodactyl or a game server on your VPS. You install it yourself, or have support install it for you as paid work.