Unable to access web server from local virtual network


Akalenuk

I have installed several virtual machines. Some uder Windows, some under Fedora Linux. On one of the Fedora machines, I have the Apache web server installed.

172.16.27.129:80I set the server name in httpd.conf to , make sure access to the html directory is , and populate that directory Allow from allwith a test .htmlfile . After starting httpd, I have a working web server locally.

Then I tried to access it from other computer and it failed. Just got the "Firefox could not establish the connection" message.

The error log on the server computer is empty. I thought it might be a firewall, so I set up iptables like this:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh 
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http state NEW,ESTABLISHED 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https state NEW,ESTABLISHED 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:http state ESTABLISHED 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:https state ESTABLISHED 

Still no luck. I think it might be network related. But I have a Subversion server working over HTTPS on one of my virtual Windows machines, so the network should be fine.

At this point, I'm running out of ideas. What did I miss?

Update: It has to be iptables. I just tweaked it a bit and the whole thing worked.

Justin Pearce
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh 
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http state NEW,ESTABLISHED 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https state NEW,ESTABLISHED 

The problem here is that both lines related to HTTP and HTTPS traffic appear right after the REJECTinput , which means that these rules are not seen at all. They need to be put into the IPTABLES config before REJECT, otherwise they will be blocked.

Related


Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The IP

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Unable to access server on Virtual Box from host?

Banuradi I'm running Ubuntu 18.04.1 in Virtual Box for MacOS. I'm setting up a server localhostin Ubuntu with Python Flask running on Python Flask , http://127.0.0.1:5000/trying to access that localhost from a Mac, but can't. I used a bridge type connection fo

Access a virtual WAMP server on the local network

rmaspero I have a server in which I have a virtual machine running WAMP Server. I can access the "site" of wampserver on the physical server outside the virtual machine. However, I want to access it from another PC on the same network as the physical server. T

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Access the local server from other computers on the network

learner I have a server on my computer and it is set --address=0.0.0.0up so that it can be accessed from other computers in the network. Now my question is, what address do other computers type as they can access the server? On the managed computer, I can do i

Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The IP

Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The ser

Apache server allows access from local network

Matthew Meehan optional I've installed fedora server but can't seem to get web requests through it. I can ping it, and as far as I can tell, apache is functioning fine on the computer. I listen on httpd.conf as Listen *:80 and the server name is ServerName 19

Unable to access Apache web server outside/inside local network

Onemic My apologies if any technical terms are used in the wrong way. I'm still new to Linux/Networking I've been trying to solve this problem for over a week now, and all the related questions from other people haven't helped me. I recently set up a webserver

Unable to access Ubuntu web server from public network

Olek I have a computer running Ubuntu Server 18.04.02 LTS with lighttpd installed and running on port 80. When I connect to the computer using port 80 of another computer in my local network, I can see the web interface of lighttpd. However, when I try to conn

Unable to access server on Virtual Box from host?

Banuradi I'm running Ubuntu 18.04.1 in Virtual Box for MacOS. I'm setting up a server localhostin Ubuntu with Python Flask running on Python Flask , http://127.0.0.1:5000/trying to access that localhost from a Mac, but can't. I used a bridge type connection fo

Unable to access web server from local virtual network

Akalenuk I have installed several virtual machines. Some uder Windows, some under Fedora Linux. On one of the Fedora machines, I have the Apache web server installed. 172.16.27.129:80I set the server name in httpd.conf to , make sure access to the html directo

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Access a virtual WAMP server on the local network

rmaspero I have a server in which I have a virtual machine running WAMP Server. I can access the "site" of wampserver on the physical server outside the virtual machine. However, I want to access it from another PC on the same network as the physical server. T

Unable to access Apache web server outside/inside local network

Onemic My apologies if any technical terms are used in the wrong way. I'm still new to Linux/Networking I've been trying to solve this problem for over a week now, and all the related questions from other people haven't helped me. I recently set up a webserver