Locked Out After a Network Change? How to Get a Linux Server Back
A wrong bridge, bond, address or route can cut a server off in a second. How to avoid it, how to get back in, and how network rollback undoes it for you.
By Frabs · 15 November 2026 · 5 min read
The short answer: if a change to a server's network cuts it off, you need a way back in that does not use that network: an out-of-band console (IPMI, iDRAC, iLO or your provider's rescue console), a change that undoes itself unless you confirm it, or something on the server that notices it is cut off and puts the last working network back. The safest habit is to never make a network change without one of these in place.
Almost everyone who runs servers has done it once: removed the wrong bridge port, mistyped an address, changed the default route, or restarted networking with a broken config. The command runs, the SSH session freezes, and the server is gone. On a hypervisor, every VPS on the node goes with it.
Why a Network Change Locks You Out
You are connected to the server through the very network you are changing. Anything that breaks the path between you and the server breaks your session at the same moment, so you never get to type the fix. The common causes:
- A bridge or bond change. Moving the uplink out of a bridge, or changing a bond's mode, drops the server's address off the wire.
- A wrong address or netmask. The server is up, but nothing can reach it.
- A changed default route. Replies to you leave by the wrong gateway, or not at all.
- A VLAN change. The interface carrying your address moves to a VLAN the switch does not give you.
- A firewall rule. A rule that drops your own SSH traffic has the same effect as a broken link.
Before You Change Anything
A few habits make a lockout far less likely, and far shorter when it happens.
Check you have console access first. Open the IPMI or rescue console before you start and make sure you can log in. Finding out it does not work is much better before the change than after.
Schedule an automatic undo. Before applying a risky change, save the current state and schedule a job to restore it, then cancel the job once you know you can still connect. With iproute2 you can save the running addresses and routes:
ip -4 addr save > /root/addr.save
ip -4 route save > /root/route.saveand schedule the restore for five minutes from now (install the at package first if the server does not have it):
echo 'ip -4 addr restore < /root/addr.save; ip -4 route restore < /root/route.save' | at now + 5 minutesIf the change works and you can still connect, remove the job with atrm. If it locks you out, the old addresses and routes come back on their own. Test this on a server you can reach another way first: restoring over a broken state can fail if the addresses are still partly in place.
Use your tools' own confirm step. Netplan has one built in:
netplan tryIt applies the new config and rolls it back after 120 seconds unless you press Enter to keep it. If you are cut off, you cannot press Enter, so it undoes itself.
Change one thing at a time. A single change that breaks something is easy to spot and reverse. Five changes at once are not.
If You Are Already Locked Out
- Use the console. Log in through IPMI, iDRAC, iLO or your provider's rescue console, which does not depend on the server's network.
- Look at what is running, not what is in the files. Use
ip addr,ip routeandbridge linkto see the live state, which may differ from your config files. - Put back the last working state. Restore the address, route or bridge port you changed, then check you can reach the gateway with
pingbefore you leave the console. - Fix the config files too. If you only fix the running state, the same broken config comes back at the next reboot.
If there is no console, your provider's support team or remote hands are the only way back, and that can take hours.
How Frabs Puts the Network Back by Itself
Every Frabs product includes network rollback, switched on by default for each server. While the server is healthy, Frabs keeps a record of its working network: addresses, routes, bridges, bonds and VLANs with their ports. When a change to that network is followed by the server losing both its gateway and its connection to Frabs for 90 seconds, Frabs puts the running network back as it was and tells your alert channels exactly what changed.
It is careful about when it acts:
- Only when the server is cut off. A change that keeps the server reachable is never touched, however unusual it looks.
- Once per change. If you make the same change again, Frabs leaves it alone, so it never fights you.
- Config files are untouched. Only the running network is restored, so you can see what went wrong and fix it properly.
- It cannot fix what is outside the server. A failed cable, switch port or upstream link is not a change on the server, so there is nothing to put back.
You can switch it off for any server in the panel. The outage, and the change that caused it, also show on the server's uptime record on Frabs Host and Frabs Hypervisor, with the server's own logs from just before.
Frequently Asked Questions
How do I get back into a server after a network change locked me out?
Use a console that does not depend on the server's network, such as IPMI, iDRAC, iLO or your provider's rescue console, then restore the address, route or bridge port you changed.
How can I make a network change undo itself if it goes wrong?
Use a confirm step such as netplan try, or save the running addresses and routes and schedule a restore with at before you apply the change. Cancel the restore once you know you can still connect.
What is network rollback in Frabs?
If a change to a server's own network cuts it off from its gateway and from Frabs for 90 seconds, Frabs puts the running network back as it was and tells you what changed. It is on by default in every product and can be switched off per server.
Does network rollback change my config files?
No. Only the running network is restored. Your config files stay as you left them, so you can fix the change properly.