When I test Apache while logged in to the machine, it works
[root@mydomain conf]# telnet mydomain.org 80
Trying ::1...
Connected to mydomain.org.
Escape character is '^]'.
get /
HTTP/1.1 400 Bad Request
But when I try to connect from another computer, it fails
$ telnet 99.99.99.99 80
Trying 99.99.99.99...
telnet: Unable to connect to remote host: Connection timed out
I'm sure the IP is correct because I can log in via SSH and the nslookup
works.
I turned on ping requests with http://superuser.com/questions/1114065/ddg#1114151 and I can't ping the server either.
$ ping mydomain.org
Pinging mydomain.org [99.99.99.99] with 32 bytes of data:
Request timed out.
Request timed out.
[root@mydomain conf]# ping mydomain.org
PING mydomain (127.0.0.1) 56(84) bytes of data.
64 bytes from mydomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.050 ms
I don't have a firewall set up with the VPS provider. I do have fail2ban
for ssh
only. My IP is not in the DENY list.
I don't bind to any specific IP in httpd.conf
Listen 80
Hmm, it was working before I started installed OpenDKIM. I don't know what changed, but I rebooted during OpenDKIM installation and Apache wasn't running so I searched for how to make it start on boot. I found this https://www.liquidweb.com/kb/how-to-install-apache-on-centos-7/ which mentioned a firewall. As soon as I enabled 80 & 443 for the firewall it worked. I didn't see anything in
iptables -L
that was rejecting those ports before, and I don't know how it was working before I started installing OpenDKIM. I never had to enable a firewall for Apache before with Centos6.