1

Apache is running properly on my server, when I'm doing a ping on the server address i'm getting only the following

PING 45.56.87.123 (45.56.87.123) 56(84) bytes of data

none of my site is loading, i have something dummy at http://45.56.87.123/test/index.html but can't even access the page there,

my iptables:

[root@localhost test]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     all  --  anywhere             anywhere            
REJECT     all  --  anywhere             loopback/8           reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:ssh
ACCEPT     icmp --  anywhere             anywhere            
LOG        all  --  anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: "
DROP       all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere      

any help on how i can get the server running properly ?

  • Since guessing is the only thing we can do I'd guess it's a firewall problem. – Gerald Schneider Jan 17 '17 at 12:50
  • port 80 is not open – Orphans Jan 17 '17 at 12:51
  • i've added my iptables, any guess – Noor Jan 17 '17 at 12:52
  • @Orphans, doing "telnet localhost 80" works – Noor Jan 17 '17 at 12:54
  • Well, your IP does not answer my telnet requests. – Orphans Jan 17 '17 at 12:57
0

Since I can't add a comment (low reputation) I'll just try pasting the answer. Basically connection to your server is timing out:

$ nc -vz 45.56.87.123 443
nc: connect to 45.56.87.123 port 443 (tcp) failed: Connection timed out

$ nc -vz 45.56.87.123 80
nc: connect to 45.56.87.123 port 80 (tcp) failed: Connection timed ou

From the iptables rules I see above I haven't noticed anything wrong so you may try checking if your service is listening on that port first:

lsof -i :80
lsof -i :443

If not than there's your problem. If yes, you're left with firewall issue so you may try restarting iptables. Also, which OS are you using?

Is connection from localhost working? Like:

curl http://45.56.87.123/test/index.html

or

nc -vz 127.0.0.1 80
nc -vz 127.0.0.1 443
0

Maybe you need to add a new sites-available configuration or change your .htaccess in your public folder

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.