Changed Ports and now panel will not display

**Operating system:**Centos
**OS version:**7

Hi, does anyone have any idea on how to access server after changing ports?.. Now I can’t login at all… The entire server is down. The only way I can login is with the Access feature in Digital Ocean. I had changed Port 22 to something else and the server stopped working. I’ve since put it back to 22 and no luck… TY

Sorry if this is insulting, but did you systemctl restart sshd after changing the port?

You also have to change the firewall rules and SELinux rules. Assuming firewalld and port 1234:

firewall-cmd --permanent --zone=public --add-port=1234/tcp
firewall-cmd --reload
semanage port -a -t ssh_port_t -p tcp 1234

and restart the service

systemctl restart sshd


Done that to change port and to change back…LOL

It’s not running with ip either…

Running ```
systemctl status sshd.service

Maybe stop the firewall for a moment?


systemctl stop firewalld
systemctl enable firewalld
systemctl restart firewalld

It stays there blinking…

Considering that you’re at the point of reinstalling the operating system anyway, I would make a Hail Mary at this point:

systemctl stop firewalld
systemctl disable firewalld

and reboot. The fact that your server is accessible from your host’s terminal but completely unresponsive to the rest of the world suggests at least the possibility of a firewall-related issue, so disable it and try accessing it again.

There’s nothing to lose at this point.


I just tried that and nothing… Very unresponsive…

O.K. I think I pinpointed it. It has no Internet…

That could be problematic.

So then the question becomes why. It obviously has network if you can access it through your DC. It may also have Internet but no DNS. I’d try

ping localhost
ping 127.0.01

If it can ping itself, then


This could be fun… or not.


I have no clue what happened to this. I can ping the ip but I can’t ping

Anything helpful in /var/log/messages ?

Also, what are the contents of /etc/resolv.conf ?


Funny you asked. It’s empty…

If you’re running BIND… Well, if it’s empty, then you’re not running BIND, even if you want to be.

Typical /etc/resolv.conf if running BIND:

search domain.tld
nameserver x.x.x.x
nameserver y.y.y.y

where “domain.tld” is the server’s hostname’s domain (not the entire hostname), and x.x.x.x and y.y.y.y are upstream nameserver IP’s. They can be any DNS servers that accept connections from the public. Lots of people use Google’s ( and The, of course, is localhost, so the server can query itself.

The question of why it’s empty is half of the puzzle. The other half is why Virtualmin didn’t throw the usual error you get when BIND is enabled and the loopback line is missing. Do you have BIND enabled?


I think I edited the Bind Config page… Why??, I don’t remember…

That might cause it not to work, but I don’t think it would cause /etc/resolv.conf to be empty. I believe Network Manager builds that file on boot (if you let it).

But I could be wrong. It’s happened.


I actually got it to show what was in it after doing a restart. It had the NS and two NS / 67.207.3

I added the x. and y the search, but nothing… This would have been easier to just re-install but, there’s an application there that needs to be saved…

I can ping these two, however, when I ping localhost, it returns a hostname I had previously. ping
doesn’t work…

This is pretty bizarre. Is the IP bound to the interface?