我有一台服务器,我可以使用实时 IP 进行 ssh。该服务器通过 DMZ 端口连接。每当我尝试访问服务器中的 Web 服务器时,都会收到“连接已重置”的消息。
我的 SeLinux 已关闭。我尝试关闭 IPTABLES。我更改了 httpd 以监听分配给 etho 的 LAN IP
Listen 192.168.0.254:80
什么都没起作用。
这是 IPTABLES -L 给我的结果
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
我发现以下使用
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
答案1
(98)地址已在使用中:make_sock:无法绑定到地址 0.0.0.0:80 没有可用的监听套接字,正在关闭
这意味着其他程序已经在监听端口 80,您的服务器无法绑定到该端口。该端口已被占用。您可能有多个使用端口 80 的“Listen”语句,或者另一个应用程序已占用该端口。
以 root 身份输入:
netstat -aeenp | egrep "User|:80"
这应该告诉您在该端口上监听什么。