Report this

What is the reason for this report?

Apache and Port 80 - IP 107.170.11.142

Posted on February 1, 2014

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



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!

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.

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>

Heya,

I know it’s been a while since you originally posted this question., but I would like to give an update.

File transfer speed may vary based on many factors, including general latency due to files being downloaded from different locations (data centers), file size differences, and client configuration.

You can tweak the client configuration to handle more simultaneous transfer requests to help speed up the process for example or explore other options to optimize the process.

You can make sure that your Apache configuration is correct. Verify that there are no syntax errors or issues in your Apache configuration files. You can use the following command to check the configuration:

  1. apachectl configtest

If there are any errors in your Apache configuration, you will need to fix them

It seems you’ve already configured your firewall rules, but it’s essential to ensure that no other firewall or security group settings are blocking port 80. Verify your DigitalOcean firewall settings and any other firewall software on your server.

You can make sure no other processes are binding to port 80. Your netstat output indicates that Apache is listening on port 80, but it’s a good practice to double-check for any conflicting processes.

  1. sudo netstat -tuln | grep :80

If you see any other processes listening on port 80, you’ll need to stop or reconfigure them

Also, you can test the connection using an alternative device and network because the problem can be local on your machine.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.