0

I have a server in which I can ssh using the live IP. The server is connected through a DMZ port. whenever I try to access the web server in the server I get Connection was reset.

My SeLinux is turned off. I tried switching off IPTABLES. I changed the httpd to listen to its LAN IP assigned to etho

Listen 192.168.0.254:80

Nothing worked.

This is what IPTABLES -L gives me

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
fail2ban-asterisk-tcp  tcp  --  anywhere             anywhere            multiport dports sip,sip-tls 
fail2ban-SSH  tcp  --  anywhere             anywhere            tcp dpt:ssh 
fail2ban-asterisk-udp  udp  --  anywhere             anywhere            multiport dports sip,sip-tls 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http 
MONITORIX_IN_8  tcp  --  anywhere             anywhere            tcp dpt:imap 
MONITORIX_IN_7  udp  --  anywhere             anywhere            udp dpt:domain 
MONITORIX_IN_6  tcp  --  anywhere             anywhere            tcp dpt:mysql 
MONITORIX_IN_5  tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn 
MONITORIX_IN_4  tcp  --  anywhere             anywhere            tcp dpt:pop3 
MONITORIX_IN_3  tcp  --  anywhere             anywhere            tcp dpt:ssh 
MONITORIX_IN_2  tcp  --  anywhere             anywhere            tcp dpt:http 
MONITORIX_IN_1  tcp  --  anywhere             anywhere            tcp dpt:ftp 
MONITORIX_IN_0  tcp  --  anywhere             anywhere            tcp dpt:smtp 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
MONITORIX_OUT_8  tcp  --  anywhere             anywhere            tcp spt:imap 
MONITORIX_OUT_7  udp  --  anywhere             anywhere            udp spt:domain 
MONITORIX_OUT_6  tcp  --  anywhere             anywhere            tcp spt:mysql 
MONITORIX_OUT_5  tcp  --  anywhere             anywhere            tcp spt:netbios-ssn 
MONITORIX_OUT_4  tcp  --  anywhere             anywhere            tcp spt:pop3 
MONITORIX_OUT_3  tcp  --  anywhere             anywhere            tcp spt:ssh 
MONITORIX_OUT_2  tcp  --  anywhere             anywhere            tcp spt:http 
MONITORIX_OUT_1  tcp  --  anywhere             anywhere            tcp spt:ftp 
MONITORIX_OUT_0  tcp  --  anywhere             anywhere            tcp spt:smtp 

Chain MONITORIX_IN_0 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_1 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_2 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_3 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_4 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_5 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_6 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_7 (1 references)
target     prot opt source               destination         

Chain MONITORIX_IN_8 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_0 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_1 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_2 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_3 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_4 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_5 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_6 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_7 (1 references)
target     prot opt source               destination         

Chain MONITORIX_OUT_8 (1 references)
target     prot opt source               destination         

Chain fail2ban-SSH (1 references)
target     prot opt source               destination         
DROP       all  --  fixed-203-240-40.iusacell.net  anywhere            
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-asterisk-tcp (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-asterisk-udp (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere

I found the following using

strace -f -o apache.trace /usr/sbin/httpd



[Thu Oct 30 17:24:10 2014] [warn] The Alias directive in /etc/httpd/conf.d/vicidial_recordings.conf at line 9 will probably never match because it overlaps an earlier Alias.
[Thu Oct 30 17:24:10 2014] [warn] The Alias directive in /etc/httpd/conf.d/vicidial_recordings.conf at line 10 will probably never match because it overlaps an earlier Alias.
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
2
  • Seems apache is not listening on the machine. Oct 28, 2014 at 19:56
  • what do u mean by that ? Oct 29, 2014 at 10:48

1 Answer 1

1

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down

This means something else is already listening on port 80 and your server can not bind to that port. It is already in use. You probably have more than one "Listen" statement that uses port 80, or another application is already on that port.

As root, type:

netstat -aeenp | egrep "User|:80"

This should tell you what is listening on that port.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .