Results 1 to 3 of 3

Thread: Can't connect to Apache web server on LAN

  1. #1
    Join Date
    Aug 2013
    Beans
    3

    Can't connect to Apache web server on LAN

    Hi all,

    I've recently just installed Apache 2 on my Linux machine, running Ubuntu Server 12.10 (no GUI). The Linux machine is connected to my WiFi. When I use ifconfig, I determine its IP address to be 192.168.1.111.
    Code:
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:24 errors:0 dropped:0 overruns:0 frame:0
              TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1792 (1.7 KB)  TX bytes:1792 (1.7 KB)
    
    
    wlan0     Link encap:Ethernet  HWaddr 80:1f:02:b3:3f:73  
              inet addr:192.168.1.111  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::821f:2ff:feb3:3f73/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3455 errors:0 dropped:0 overruns:0 frame:0
              TX packets:581 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:1499843 (1.4 MB)  TX bytes:100562 (100.5 KB)
    However, when I try to use other machines (that are using Windows) on the same network (connected by ethernet cable), I can't open the page when I type 192.168.1.111 in the address bar of a web browser. The strange thing is that my other 2 computers (connected by ethernet cable), have an IP address of 192.168.254.XXX, but my Linux box didn't. I also cannot use PuTTY to ssh into my Linux box.

    When using the Linux machine, I can ping 127.0.0.1 as well as 192.168.1.111, but when using my Windows machines, I get a timeout.

    I've tried using
    Code:
    sudo ufw disable
    but that didn't help.

    I've also tried restarting apache using
    Code:
    sudo services apache2 restart
    My /etc/network/interface looks like this:
    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    My /etc/resolv.conf:
    Code:
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 192.168.1.1
    My /etc/hosts:
    Code:
    127.0.0.1        localhost
    127.0.1.1        andrew-ubuntu2
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    andrew-ubuntu2 is the name of my Linux box.

    Code:
    $ sudo iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination

    All machines are behind a router.

    Can anyone help, please?

    Thanks!
    Last edited by andrew9; August 7th, 2013 at 08:32 AM.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,449
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Can't connect to Apache web server on LAN

    Are the machines using Ethernet connected to the hub on the back of the wifi router? It sounds like you have two routers on the network, one serving the wifi connection, and one serving the wired connections. If so, you'd need to set up static routing on both routers to send packets destined for 192.168.254.0/24 from 192.168.1.0/24 and vice versa.

    Try connecting all the machine to one router. It should distribute addresses within the same network subnet and allow all the machines to see each other painlessly.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Aug 2013
    Beans
    3

    Re: Can't connect to Apache web server on LAN

    You are right, thanks!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •