0

I am trying to access my apache2 server which is hosted on a Debian based linux system over the local network but unfortunately it is not being accessible. While i try to access it as localhost or 192.168.1.x(through ip address) it is accessible on local machine but while at LAN it is not being accessible. I also tried fresh installation of apache2 server and tried to fix, but nothing useful..

I modified /etc/apache2/ports.conf file where I commented Listen *:80 line and changed it to Listen 0.0.0.0:80

Also, I modified /etc/apache2/sites-available/000-default.conf file where I changed the line VirtualHost *:80 to VirtualHost 0.0.0.0:80 As far as I am aware, there is no firewall running on the system or any sorts of iptabe rules.

While I try the netstat command it shows:

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      7780/apache2 

nmap the ip 192.168.1.x also shows that the port is open.

Furthermore, While trying to server the content through python -m SimpleHTTPServer 8080 the content is only accessible on local machine but not on LAN. I doubt that it is some sort of networking or port forwarding issue or such. I might be mistaken here though!

Can anyone please help me to sort out the problem and help me find out what I am missing here?

9
  • show iptables -L -v please
    – NoAngel
    Mar 15, 2018 at 3:59
  • Everything seems to be accepting here Chain INPUT (policy ACCEPT 0 packets, 0 bytes) Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) Mar 15, 2018 at 4:00
  • Update: I restarted the apache2 server and I got that there are no packets movement in the forward chain Chain INPUT (policy ACCEPT 1908 packets, 3564K bytes) Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) Chain OUTPUT (policy ACCEPT 1858 packets, 1866K bytes) Mar 15, 2018 at 4:07
  • ok, that seems to be not a firewall issue, try check ifconfig, Your PC has valid IP address and it's on the same subnet as other PCs which can't connect. Also check route -n output.
    – NoAngel
    Mar 15, 2018 at 5:01
  • For instance, my system is 192.168.1.5 and the gateway is 192.168.1. The system that is trying to connect to 192.168.1.5 is 192.168.1.6 | The route -n shows Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0 which seems good I guess | however 'ifconfig' shows that I have ipv6 address in use whereas I have turned of ipv6 through 'NetworkManager' the ipv4 thing seems good... still confused! Mar 15, 2018 at 5:34

0

You must log in to answer this question.