Apache and Port 80 - IP 107.170.11.142

February 1, 2014 1.4k views
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 '^]'. ] 501 Method Not Implemented

Method Not Implemented

] to /index.html not supported.


Apache/2.2.22 (Debian) Server at mydomain.com Port 80
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
1 Answer
We definitely do not block port 80, or any other port. Try clearing your firewall rules:
iptables-save > /root/iptables_backup-"$(date)"

iptables -F
iptables -X
Have another answer? Share your knowledge.