I work a lot with remote servers. I locked myself out in a similar way once or twice before. I felt like the dumbest person alive every time it happened.
I changed some of my router's VPN settings from abroad once because it wasn't performing as expected.
To apply the setting (through the GUI), I remembered you had to press the stop button and then the start button (there was no restart button in that menu). Guess what happened.