S
S
s_pyanov2015-07-13 18:27:49
Apache HTTP Server
s_pyanov, 2015-07-13 18:27:49

Httpd is not connected from other machines. Where to dig?

Available:
1.fedora 21
2. httpd was installed
3. firewall disabled
4. virtual host configured
5. ip connection from the machine on which the web server is installed passes (in my case I enter ip 192.168.1.67) - I get the text from index. html
6. I'm trying to connect from other machines - the connection fails (time out).
7. Site logs do not write anything about connection attempts.

Listen 192.168.1.67:80

Include conf.modules.d/*.conf

User apache
Group apache

ServerAdmin [email protected]

<Directory />
    AllowOverride none
    Require all denied
</Directory>


DocumentRoot "/var/www/html"


<Directory "/var/www">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>


<Directory "/var/www/html">
     Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>


<Files ".ht*">
    Require all denied
</Files>


ErrorLog "logs/error_log"

LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>


AddDefaultCharset UTF-8

EnableSendfile on

IncludeOptional conf.d/*.conf

<VirtualHost *>
#электронная почта администратора
        ServerAdmin [email protected]
#путь к директории хоста
        DocumentRoot /var/www/html
#имя хоста
        ServerName localhost.localdomain
#псевдоним хоста
#        ServerAlias www.site1.ru
#путь к логам ошибок хоста
        ErrorLog /var/www/logs/error_log_error_log
#путь к общим логам хоста
        CustomLog /var/www/logs/log_host_log common
</VirtualHost>

information about the virtual host is loaded from a file vhost.conflocated in /etc/httpd/conf.d/
<VirtualHost *:80> 
     ServerAdmin [email protected]
     ServerName example.com
     ServerAlias www.example.com
     DocumentRoot /var/www/example.com/public_html/
     ErrorLog /var/www/example.com/logs/error.log 
     CustomLog /var/www/example.com/logs/access.log combined
</VirtualHost>

all directories are created, rights are assigned to 777 (while being tested).
netstat gives this
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              0.0.0.0:*               LISTEN      860/sshd            
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1646/cupsd          
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      1987/dropbox        
tcp        0      0 127.0.0.1:17600         0.0.0.0:*               LISTEN      1987/dropbox        
tcp        0      0 127.0.0.1:17603         0.0.0.0:*               LISTEN      1987/dropbox        
tcp        0      0 192.168.1.67:80         0.0.0.0:*               LISTEN      3255/httpd          
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1257/dnsmasq        
tcp6       0      0 :::22                   :::*                    LISTEN      860/sshd            
tcp6       0      0 ::1:631                 :::*                    LISTEN      1646/cupsd          
tcp6       0      0 :::3306                 :::*                    LISTEN      1367/mysqld         
udp        0      0 0.0.0.0:3017            0.0.0.0:*                           1532/dhclient       
udp        0      0 192.168.122.1:53        0.0.0.0:*                           1257/dnsmasq        
udp        0      0 0.0.0.0:67              0.0.0.0:*                           1257/dnsmasq        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1532/dhclient       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           674/chronyd         
udp        0      0 127.0.0.1:323           0.0.0.0:*                           674/chronyd         
udp        0      0 0.0.0.0:17500           0.0.0.0:*                           1987/dropbox        
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           2470/chrome         
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           664/avahi-daemon: r 
udp        0      0 0.0.0.0:46860           0.0.0.0:*                           664/avahi-daemon: r 
udp6       0      0 :::24453                :::*                                1532/dhclient       
udp6       0      0 :::123                  :::*                                674/chronyd         
udp6       0      0 ::1:323                 :::*                                674/chronyd

Apparently it is not blocked at the httpd level, but then where???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Verbin, 2015-07-14
@rez0n

iptables?

S
s_pyanov, 2015-07-16
@s_pyanov

[[email protected] ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
INPUT_direct  all  --  anywhere             anywhere
INPUT_ZONES_SOURCE  all  --  anywhere             anywhere
INPUT_ZONES  all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24     ctstate RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
FORWARD_direct  all  --  anywhere             anywhere
FORWARD_IN_ZONES_SOURCE  all  --  anywhere             anywhere
FORWARD_IN_ZONES  all  --  anywhere             anywhere
FORWARD_OUT_ZONES_SOURCE  all  --  anywhere             anywhere
FORWARD_OUT_ZONES  all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
OUTPUT_direct  all  --  anywhere             anywhere

Chain FORWARD_IN_ZONES (1 references)
target     prot opt source               destination
FWDI_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
FWDI_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
FWDI_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
FWDI_FedoraWorkstation  all  --  anywhere             anywhere            [goto]

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain FORWARD_OUT_ZONES (1 references)
target     prot opt source               destination
FWDO_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
FWDO_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
FWDO_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
FWDO_FedoraWorkstation  all  --  anywhere             anywhere            [goto]

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain FORWARD_direct (1 references)
target     prot opt source               destination

Chain FWDI_FedoraWorkstation (4 references)
target     prot opt source               destination
FWDI_FedoraWorkstation_log  all  --  anywhere             anywhere
FWDI_FedoraWorkstation_deny  all  --  anywhere             anywhere
FWDI_FedoraWorkstation_allow  all  --  anywhere             anywhere

Chain FWDI_FedoraWorkstation_allow (1 references)
target     prot opt source               destination

Chain FWDI_FedoraWorkstation_deny (1 references)
target     prot opt source               destination

Chain FWDI_FedoraWorkstation_log (1 references)
target     prot opt source               destination

Chain FWDO_FedoraWorkstation (4 references)
target     prot opt source               destination
FWDO_FedoraWorkstation_log  all  --  anywhere             anywhere
FWDO_FedoraWorkstation_deny  all  --  anywhere             anywhere
FWDO_FedoraWorkstation_allow  all  --  anywhere             anywhere

Chain FWDO_FedoraWorkstation_allow (1 references)
target     prot opt source               destination

Chain FWDO_FedoraWorkstation_deny (1 references)
target     prot opt source               destination

Chain FWDO_FedoraWorkstation_log (1 references)
target     prot opt source               destination

Chain INPUT_ZONES (1 references)
target     prot opt source               destination
IN_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
IN_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
IN_FedoraWorkstation  all  --  anywhere             anywhere            [goto]
IN_FedoraWorkstation  all  --  anywhere             anywhere            [goto]

Chain INPUT_ZONES_SOURCE (1 references)
target     prot opt source               destination

Chain INPUT_direct (1 references)
target     prot opt source               destination

Chain IN_FedoraWorkstation (4 references)
target     prot opt source               destination
IN_FedoraWorkstation_log  all  --  anywhere             anywhere
IN_FedoraWorkstation_deny  all  --  anywhere             anywhere
IN_FedoraWorkstation_allow  all  --  anywhere             anywhere

Chain IN_FedoraWorkstation_allow (1 references)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             224.0.0.251          udp dpt:mdns ctstate NEW
ACCEPT     udp  --  anywhere             anywhere             udp dpt:netbios-ns ctstate NEW
ACCEPT     udp  --  anywhere             anywhere             udp dpt:netbios-dgm ctstate NEW
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh ctstate NEW
ACCEPT     udp  --  anywhere             anywhere             udp dpts:blackjack:65535 ctstate NEW
ACCEPT     tcp  --  anywhere             anywhere             tcp dpts:blackjack:65535 ctstate NEW

Chain IN_FedoraWorkstation_deny (1 references)
target     prot opt source               destination

Chain IN_FedoraWorkstation_log (1 references)
target     prot opt source               destination

Chain OUTPUT_direct (1 references)
target     prot opt source               destination

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question