Find the answer to your Linux question:
Results 1 to 6 of 6
Have recently installed the Debian 3.1 Sarge (multiuser workstation install) and I can access a webserver of my own here at my local LAN, but I can't access the Internet, ...
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    1

    Can access webserver on local LAN, but not the Internet

    Have recently installed the Debian 3.1 Sarge (multiuser workstation install) and I can access a webserver of my own here at my local LAN, but I can't access the Internet, if I don't do this in before:

    1) Remove a default setup, 'route del default eth0'
    2) Adding, 'route add default gw 192.168.7.5 eth0', which address belongs to my Freesco Linux router.
    3) Remove of the domain name to my local old Debian 3.0 Samba server (192.168.7.1) which also handles the DHCP addresses to all Windows and Linux workstations within the local LAN. I use the graphical networking tool for this in GNOME. I'm logged in as root user in a terminal window doing these route commands.

    After a few minutes, every setup done above are removed in the route table, and the domain name is back also, and I have to do all again to be able to surf. What is overwriting my changes.

    TIA

  2. #2
    Linux Newbie
    Join Date
    Dec 2003
    Location
    Netherlands
    Posts
    193
    Probably you did something wrong?

    You should change your conf file of your httpd server, and not your Samba Server. Do you run a Firewall? and did you enable port 80 on the external network address?
    Computers Are Like Air Conditioners... They\'re both useless with Windows open!

  3. #3
    Linux Newbie
    Join Date
    Aug 2005
    Posts
    213
    this sounds like configuration problem. Its usually a all or none phenomenon with LAN n connectivity.

    Check the dsn settings.
    Cool Surfer - Registered linux user #397629

  4. #4
    Just Joined!
    Join Date
    Jan 2005
    Location
    Topeka, KS, USA
    Posts
    88
    Let me get this right. You've got Apache running on a server, and you can load pages if you are running on the same network. But if you try to access it from somewhere else, it doesn't work.

    If the address you are trying to use to connect to that server that has an address that starts with 192.168, you won't be able to connect to it. That addresses are non-routeable (http://www.pku.edu.cn/academic/resea...ml/TC0305.html). There are thousands of computers on the internet with those addresses, but none of them are able to directly connect to other computers on the Internet.

    What happens is your router uses Network Address Translation, or NAT. You router has the IP address your ISP has given you, and then your router uses DHCP to setup a LAN with private addresses, and when your computer tries to go to the internet, the router changes the address to it's own public address. When the returning packets get to your router, it re-modifies them from the public address to your computer's private address. The problem for someone who is using a NAT device like your router is that you cannot reach the computers behind it directly across the internet. This gives you security, but hinders usibility. You should be able to test this theory by plugging the server directly into your modem without the router in between. You might be able to finding out what address you are getting from the ISP using this method.

    To fix this, you'll have to study the documentation for your router and see if there is a way to direct traffic to a particular device or address once it has recieved the request across the internet. You might let us know what router you have, and maybe we can help with this.

  5. #5
    Linux Newbie
    Join Date
    Aug 2005
    Posts
    213

    Re: Can access webserver on local LAN, but not the Internet

    Quote Originally Posted by spaceuser
    After a few minutes, every setup done above are removed in the route table, and the domain name is back also, and I have to do all again to be able to surf. What is overwriting my changes.
    TIA
    I also had the same problem, after every reboot, i found the the ip
    set to 127.0.0.1 , when i had configured it something like 192.168.***.*

    Also check if you have activated the connection eth0 or what ever.

    And if there is a login thing, u will have to use th elinux version of it.
    I could reach my host, the web pag used to open properly, but i could not
    open sites like yahoo or google.

    on installing the client side of the login, it was all fine for me.
    But still sometimes I get funny errors while onnecting to WAN.

    Intranet works fine.
    Cool Surfer - Registered linux user #397629

  6. #6
    Just Joined!
    Join Date
    Jul 2008
    Posts
    1

    port forwarding

    The machine in your LAN with apache installed is behind NAT. Forward port 80, or whatever port apache is configured to listen on, to the ip of the machine hosting apache. Do this configuring your router.

    127.0.0.1 is the localhost. it is important for providing local services, within the OS of each machine.

    192.168.*.* will be your ip on the lan. you will forward port 80 to this machine.

    After 3 years nobody will read this, but it comes up high in google searches, so I figured I'd answer it.

    Cheers.

Posting Permissions

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