Cant log into, ping, or access domain on CentOS Apache server

Issues related to configuring your network
Post Reply
jaaywags
Posts: 6
Joined: 2017/04/10 22:42:06

Cant log into, ping, or access domain on CentOS Apache server

Post by jaaywags » 2017/04/10 22:57:00

Hello,

I am sorry if I am off-topic or not clear in my post. This is my first one, and I am not fantastic at managing servers. I am more of a programmer than anything.

Anyway, I have a CentOS 7 server, and recently I tried to setup a mail server. I followed this tutorial: https://hostpresto.com/community/tutori ... n-centos7/, but I was unable to send email after. At this point I was still able to navigate to my domain. So I moved onto a different tutorial: https://www.howtoforge.com/tutorial/per ... ispconfig/. I reached the point where it said to do a reboot, and I was unable to log in using my normal root level account. Being with my root account having login disabled, the only way I was able to log in was by setting up a session in my hosting companies serial console.

I know this is nearly not enough information, but I will try to respond quickly. Let me know what you guys need to know and I will post it.

Thanks!

User avatar
TrevorH
Site Admin
Posts: 33232
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by TrevorH » 2017/04/11 00:15:03

Reverse all the stuff you did following that howtoforge article. Next time you're tempted to use a guide found on the internet, first avoid howtoforge. Second, any other guide you come across that tells you to disable selinux, avoid that too. I didn't check the other article you mentioned since it's apparent that the one that did the damage is howtoforge (again!).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jaaywags
Posts: 6
Joined: 2017/04/10 22:42:06

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by jaaywags » 2017/04/11 00:51:38

I did not really do too much other then disable firewall-d (which I did not have installed before the first tutorial).

In howtoforge tutorial, it asked me to change my keyboard settings, which I did not do.
It asked me to:
systemctl stop firewalld.service
systemctl disable firewalld.service

I justenabled and started firewalld.

It had asked me to edit my network card settings. I did not do that.

It had told me to disable selinux, but the file, /etc/selinux/config, does not exist on my system and I cannot enable it with, setenforce 1.

And that is as far as I had made it.


I ran some commands I thought might be useful. Below is the output.

Code: Select all

# systemctl status firewalld
* firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Code: Select all

# systemctl status httpd
* httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2017-04-10 17:06:05 EDT; 2h 4min ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 2692 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
 Main PID: 2697 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           |-2697 /usr/sbin/httpd -DFOREGROUND
           `-2699 /usr/sbin/httpd -DFOREGROUND

Apr 10 17:06:05 server systemd[1]: Starting The Apache HTTP Server...
Apr 10 17:06:05 server systemd[1]: Started The Apache HTTP Server.

Code: Select all

# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Code: Select all

# service sshd status
Redirecting to /bin/systemctl status  sshd.service
* sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-04-10 13:12:14 EDT; 6h ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 1990 (sshd)
   CGroup: /system.slice/sshd.service
           `-1990 /usr/sbin/sshd

Apr 10 13:12:14 server systemd[1]: Starting OpenSSH server daemon...
Apr 10 13:12:14 server sshd[1990]: Server listening on 0.0.0.0 port 7822.
Apr 10 13:12:14 server sshd[1990]: Server listening on :: port 7822.
Apr 10 13:12:14 server systemd[1]: Started OpenSSH server daemon.

Code: Select all

# firewall-cmd --state
not running

Also, when I try to ping my server, I get a "request timed out"

User avatar
TrevorH
Site Admin
Posts: 33232
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by TrevorH » 2017/04/11 09:52:43

It had told me to disable selinux, but the file, /etc/selinux/config, does not exist on my system and I cannot enable it with, setenforce 1.
That sounds like what you have there is not a CentOS system. All versions of CentOS should have that file, even if selinux is disabled.

What is the output from uname -a on your system?

I see that firewalld attempted to start and failed though it is not enabled according to your output.

iptables is not blocking anything since you have no rules and the default policy is shown as ACCEPT.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jaaywags
Posts: 6
Joined: 2017/04/10 22:42:06

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by jaaywags » 2017/04/11 11:44:51

Code: Select all

# uname -a
Linux server 2.6.32-042stab120.19 #1 SMP Mon Feb 20 20:05:53 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

# systemctl enable firewalld
# systemctl start firewalld
# systemctl status firewalld -l
* firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-04-10 20:42:32 EDT; 11h ago
     Docs: man:firewalld(1)
 Main PID: 3241 (firewalld)
   CGroup: /system.slice/firewalld.service
           `-3241 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Apr 10 20:42:32 server systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 10 20:42:32 server systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 10 20:42:32 server firewalld[3241]: WARNING: ipset not usable, disabling ipset usage in firewall.
Apr 10 20:42:32 server firewalld[3241]: WARNING: ebtables not usable, disabling ethernet bridge firewall.
Last edited by jaaywags on 2017/04/11 11:51:38, edited 2 times in total.

User avatar
TrevorH
Site Admin
Posts: 33232
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by TrevorH » 2017/04/11 11:47:01

Yes, you need to talk to your hosting provider as that is an openvz container, not a CentOS system at all.

http://wiki.centos.org/AdditionalResources/OtherSpins
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jaaywags
Posts: 6
Joined: 2017/04/10 22:42:06

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by jaaywags » 2017/04/11 11:52:42

That is very odd. I will open ticket with them and see what they say.

jaaywags
Posts: 6
Joined: 2017/04/10 22:42:06

Re: Cant log into, ping, or access domain on CentOS Apache server

Post by jaaywags » 2017/04/11 20:27:19

Well, I am not sure if this will be any use to anyone ever, but I thought I would post it anyway. I do not know exactly how I fixed the issue I was having, I changed a lot of settings, and restarted a lot of services, but I ended up realizing I did not have any internet connection my server at all. When I ran, systemctl status network, I noticed the error:
failed to bring up/down networking: configure interface for a trunk interfa
I ran the below commands:
service NetworkManager stop
service network restart
chkconfig NetworkManager off
chkconfig network on
and everything started working. I will now backup what I need and reinstall my OS to fix all other issues I know I created when investigating this. Hopefully this helps someone in the future.

Post Reply