I did something really stupid by accidently.

Well, we have some remote machines running ubuntu 14.04 lts. Those are some kind of servers, not desktop etc.

We can access those servers with port forwarding, and only 443,22,80 ports are enabled. We had some troubles about VPN connections and i connected to a remote with ssh, and then tried to enable ufw rules and then allowed 443 port on that remote, closed and after secs i realized i did something stupid.

Now, i cannot even ssh to fix this problem, i cannot even connect http server of it, and also we already have some problems about port 443, so i cannot find any way to connect this remote. ufw caused to lose connections in any way.

Is there anything i can do to change this stupid mistake. any chance?

  • 1
    Unless you know that these hosts have some sort of iDRAC/LOM etc of BMC or serial management port that is connected to the network you cannot access this host and would need physical access. You would have to ask whoever installed the host if they configured remote console access to the hardware. More information with the IPMI. – Terrance Mar 6 '17 at 19:25

If all ports on all interfaces are closed?
In that case you have a problem. One that usually requires physical access (either yours or by a trained person nearby).

If they truly are servers (and not a regular desktop used as a server) then there might be hope. Many servers come with a remote access tools like a DRAC. This is essentially a second mini computer using its own OS, its own NIC and its own rules. If one is installed and configured then you should be able to 'remotely' get physical access.

As in, you should be able to see the console, fake input from the keyboard, see what is on the screen etc. That way you could log in without encountering the firewall rules set on your regular network.

Note that these remote control networks often are on their own network. So you might need to arrange access to that. And you would need a username and password. If those are still on default that you are lucky. (Twice lucky even, since everyone might have guessed factory defaults). If not then it is hopefully either written down or disabled. In which case you fall back to classic physical access to the console.

Also, to avoid future problems, try to do these kind of things in screen or tmux. First setup a recovery (e.g. sleep 1800 && reboot), next start a second terminal and apply and test changes. If they work then do not forget to cancel the recovery commands on the other terminal.

  • really appreciate for your answer. Actually, when we put those machines on our network and start ip scanning, we always see 2 different machines, one of them which we use, the other one has its own ip, own user interface (called micro computer). I guess you are talking about the second one? I do not exactly know DRAC etc, i need to search; but i think i have what you are talking about. By the way, thanks for your advice. – arkbrk Mar 6 '17 at 19:42
  • I am mostly used to a DRAC 5, but many servers have their own version. E.g. if you have a SuperMicro or a HP look for Intergrated Lights Out (ILO) – Hennes Mar 6 '17 at 19:49

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.