Question

Apache and Port 80 - IP 107.170.11.142

Hi,

I have a problem with port 80. It seems to me that digitalocean blocks port 80 (I could not access port 80 even when firewall was switched off)

Here is what I already did:

root@XXXXX:~# iptables -L Chain INPUT (policy DROP) target prot opt source destination
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED DROP all – anywhere anywhere state INVALID ACCEPT all – anywhere anywhere ;
ACCEPT tcp – anywhere anywhere tcp dpt:ssh ACCEPT udp – anywhere anywhere udp dpt:ssh ACCEPT tcp – anywhere anywhere tcp dpt:http ACCEPT tcp – anywhere anywhere tcp dpt:8030 ACCEPT &nb sp; icmp – anywhere anywhere icmp echo-request REJECT tcp – anywhere anywhere state NEW tcpflags:! SYN,RST,ACK/SYN reject-with tcp-reset REJECT tcp – anywhere anywhere tcpflags: SYN,RST,ACK/SYN reject-with tcp-reset REJECT tcp – anywhere anywhere tcpflags: FIN,SYN,RST,PSH,A CK,URG/FIN,SYN,RST,PSH,ACK,URG reject-with tcp-reset REJECT tcp – anywhere anywhere tcpflags: FIN,SYN,RST,PSH,ACK,URG/NONE reject-with tcp-reset REJECT tcp – anywhere anywhere tcpflags: FIN,SYN/FIN,SYN reject-with tcp-reset REJECT tcp – anywhere anywhere tcpflags: SYN,RST/SYN,RST reject-with tcp-reset REJECT tcp – anywhere ; anywhere tcpflags: FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,ACK,URG reject-with tcp-reset REJECT tcp – anywhere anywhere tcpflags: FIN,SYN,RST,PSH,ACK,URG/FIN,PSH,URG reject-with tcp-reset REJECT tcp – anywhere anywhere reject-with tcp-reset DROP all – anywhere anywhere

Chain FORWARD (policy ACCEPT) target p rot opt source destination

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

root@XXXXX:~# netstat -plutn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 &nbs p; 0.0.0.0:* LISTEN 5562/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2319/exim4
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 3841/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 9336/apache2
tcp6 0 0 :::22 :::* LISTEN 5562/sshd
tcp6 0 0 ::1:25 :::* LISTEN 2319/ exim4

Trying to access apache at 80 port from mydomain.com: root@xcanner:~# telnet localhost 80 Trying 127.0.0.1… Connected to localhost. Escape character is ‘^]’. ] <!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>] to /index.html not supported.<br /> </p> <hr> <address>Apache/2.2.22 (Debian) Server at mydomain.com Port 80</address> </body></html> Connection closed by foreign host.

Trying to access apache on 80 port from my local computer: lsd% telnet 107.170.11.142 80 &n bsp;
Trying 107.170.11.142… telnet: Unable to connect to remote host: Connection refused


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

We definitely do not block port 80, or any other port. Try clearing your firewall rules: <br><pre>iptables-save > /root/iptables_backup-“$(date)” <br>iptables -F <br>iptables -X</pre>