0

I'm trying to install LAMP.

I followed the instructions here.

I'm stuck at installing apache/httpd

I've installed apache/httpd in a ssh server. When trying to check if apache is okay, which is opening a web browser and input the ip address, it would show that "This site cannot be reached".

What suppose could be the problem?

here is the local firewall config

Chain INPUT (policy DROP 142 packets, 7398 bytes)
 pkts bytes target     prot opt in     out     source               destination
 2492  218K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x3F/0x00
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:!0x17/0x02 state NEW
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x3F/0x3F
   34  2040 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:2202

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 2364 packets, 225K bytes)
 pkts bytes target     prot opt in     out     source               destination
andil01
  • 377
  • 4
  • 19
  • My guess is a firewall is dropping the packets before they get to your host, or even the firewall on your linux host itself. If you are using EC2, you need to allow the world to access port 80 & 443. Who is your VPS host? And can you share your local firewall config? `sudo iptables -vnL` – Matt Clark Nov 08 '17 at 01:27
  • @MattClark I've shared the output. see updates – andil01 Nov 08 '17 at 01:31
  • Looks like even if there is a firewall before you, the packets would still be filtered here. Your tables look like the firewall is managed _somewhere_ but I am not sure where exactly. Who is your provider / what OS are you running? You can try and run `sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT`, however this will not stick around after a reboot. This command will allow TCP packets on port 80 through the firewall. – Matt Clark Nov 08 '17 at 01:34
  • @MattClark AWS servers,based in japan, i'm using PuTTy session with ssh connection to access the server. I'm using windows as my OS by the way – andil01 Nov 08 '17 at 01:49
  • Have you tried running that command to open the port and hitting it again from the web? If that works we can figure out he to make it permanent. – Matt Clark Nov 08 '17 at 02:00
  • @MattClark it worked! so how can it made to be permanent? – andil01 Nov 08 '17 at 02:02

0 Answers0