Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    77

    Default LAN + Router + Home mail/web server = Few troubles

    Hey guys, I've just set myself up a nice little RH9 box to host a few of my little websites and to run my email aswell..

    But I have a few problems accessing the server from within the internal LAN.

    Ok so..

    Server IP - 192.168.1.200
    Laptop IP - 192.168.1.3
    Router IP - 192.168.1.254 ( And also the static external IP )
    Domain Name ( example.com from here on ) poiting to the routers external IP

    Router is a Nokia M1122.

    From anywhere outside of my 192.168.1.* LAN I can browse to www.example.com and see my website, can also check webmail, etc..

    From in side my 192.168.1.* LAN, I can only access the server by browsing to the servers IP ( http://192.168.1.200/ ) - If I try to browse to www.example.com I just get the routers login page.

    Now, I know I can edit my hosts file to just redirect any connections to www.example.com to 192.168.1.200 but this really isn't that good as I also like to use my laptop at work, and if it connects to 192.168.1.200 on my works network it'll find nothing.

    Does anyone know how I can set my router to ignore these requests?

    I was thinking of trying to set my router to use a different port for it's web interface, but the option doesn't seem to be there.

    Any help would be great.

    P.S.
    I've set the router up to forward http requests on port 80 to my server.. 'Pin hole' I believe these rules are called.

  2. #2
    Pedant and proud of it
    Join Date
    Dec 2004
    Location
    Christchurch
    Posts
    6,047

    Default Re: LAN + Router + Home mail/web server = Few troubles

    I'm not quite sure what the problem is. The router shouldn't do anything if a host on the 192.168.1.x LAN wants to contact another hoston the LAN. A router handles access to and from the outside world. The 192 range isn't routable.

    I would just put a line for the server in the laptop's hosts file like:
    "192.168.1.200 www.example.home example myserver "

    Then you could do "http://example" or any of the other names (aliases) you want to give it.

    As soon as you use the external name (presumably registered in the DNS system) it must use an external "real" IP address, and the only way you can access it is by going out through the router then back again.

  3. #3
    Senior Member
    Join Date
    Dec 2004
    Location
    The Bronx
    Posts
    1,357

    Default Re: LAN + Router + Home mail/web server = Few troubles

    you could set up the server as a DNS server......

    all computers in the 192.168 world check the server for DNS.

    the server is set to give a dns of 192.168.1.200 for example.com and hand off to your ISPs DNS for all other DNS stuff.
    "Sometimes the only thing more dangerous than a question is an answer!"
    Grand Nagus - Zek

    http://brightwork.wordpress.com/

  4. #4
    Pedant and proud of it
    Join Date
    Dec 2004
    Location
    Christchurch
    Posts
    6,047

    Default Re: LAN + Router + Home mail/web server = Few troubles

    Quote Originally Posted by robsonde
    you could set up the server as a DNS server......

    all computers in the 192.168 world check the server for DNS.

    the server is set to give a dns of 192.168.1.200 for example.com and hand off to your ISPs DNS for all other DNS stuff.
    Gross overkill. There is a server, one client and a router in the LAN. A hosts file is quicker. And better. The KISS principle applies here. It's non-trivial setting up a DNS server.

    Apart from anything else, the name "www.example.com" should have one and only one (routable) IP address associated with it. A DNS server should never be set up to tell lies.

  5. #5
    Senior Member
    Join Date
    Dec 2004
    Location
    The Bronx
    Posts
    1,357

    Default Re: LAN + Router + Home mail/web server = Few troubles

    Quote Originally Posted by Graham L
    Gross overkill. There is a server, one client and a router in the LAN. A hosts file is quicker. And better. The KISS principle applies here. It's non-trivial setting up a DNS server.

    Apart from anything else, the name "www.example.com" should have one and only one (routable) IP address associated with it. A DNS server should never be set up to tell lies.

    sorry , i dident see that you only have one other computer in the system.


    however for a system where more computers are involved i think the internal DNS system is best, as for having a DNS server that gives a difrent IP for internal to external.... I see nothing wrong with it. how is is such a bad thing?
    "Sometimes the only thing more dangerous than a question is an answer!"
    Grand Nagus - Zek

    http://brightwork.wordpress.com/

  6. #6
    Junior Member
    Join Date
    Jan 2005
    Posts
    77

    Default Re: LAN + Router + Home mail/web server = Few troubles

    Quote Originally Posted by Graham L
    I'm not quite sure what the problem is. The router shouldn't do anything if a host on the 192.168.1.x LAN wants to contact another hoston the LAN. A router handles access to and from the outside world. The 192 range isn't routable.
    The problem is that I have an actual domain name.. And when I type that name into a browser it goes to DNS and then the DNS server points back to my routers external IP, which if I'm behind my router (if I'm connected to my home 192.168.1.* LAN) the router takes over and you see the web-interface.

    It works fine from any other location outside of my home LAN.

    Quote Originally Posted by Graham L
    I would just put a line for the server in the laptop's hosts file like:
    "192.168.1.200 www.example.home example myserver "

    Then you could do "http://example" or any of the other names (aliases) you want to give it.
    This is what I was using, but because I move a lot between my home LAN and my works LAN, I'm constantly having to comment/uncomment the line in my hosts file.. Which is quite a hassle when I have to do it 6+ times a day.

    Quote Originally Posted by Graham L
    As soon as you use the external name (presumably registered in the DNS system) it must use an external "real" IP address, and the only way you can access it is by going out through the router then back again.
    Exactly that, when connected to my home LAN and I type www.example.com (not my actual domain name) into my browser it'll go out through the router to my DNS servers, which then point back at my routers external IP, which is correct. But my router shows me the web-interface for the router instead of the webpage on the server. - If I plug in at work and type www.example.com into my browser it'll go straight to the webpage on the server.

    --

    I'm not really new to networking or anything.. Basically all I want to do is tell my router to only listen for http requests on a port other than 80.. So that instead of it pulling it's web-interface out, it'll pass me through to my server.

    But the option isn't anywhere to be found in the router.


  7. #7
    Pedant and proud of it
    Join Date
    Dec 2004
    Location
    Christchurch
    Posts
    6,047

    Default Re: LAN + Router + Home mail/web server = Few troubles

    As I said, where is the problem? You don't need to keep changing the hosts file.

    You use the registered external name when you are at work. That uses the DNS address resolution, and routers link you with your server behind your router.You use the different, local, name which is handled by the hosts file when you are at home. When yyou are at home, you are in the same network as the server. Routing is neither needed nor desirable. Make the hosts file, then leave it alone.

    There isn't an option in the router to tell it to route to the LAN from the LAN. That's not how it works. Routers act as gateways between networks.

    Why go looking for complicated ways of doing something straightforward?

  8. #8
    Junior Member
    Join Date
    Jan 2005
    Posts
    77

    Default Re: LAN + Router + Home mail/web server = Few troubles

    Hrmmn, I might have to stick with the hosts thing then.

    I was hoping on being able to enter www.example.com from either location and see the same thing.

  9. #9
    Senior Member
    Join Date
    Dec 2004
    Posts
    1,164

    Default Re: LAN + Router + Home mail/web server = Few troubles

    l0gic,

    You suggested the best way which was changing your host file to point to it, another alternative is to create your own caching DNS server, good thing about this, if the primary fails (your own) then the secondary DNS server will be used, and this will pick up your site, so no need to change the host file.

    Cheers,


    KK

  10. #10

    Default Re: LAN + Router + Home mail/web server = Few troubles

    Quote Originally Posted by l0gic
    Hrmmn, I might have to stick with the hosts thing then.

    I was hoping on being able to enter www.example.com from either location and see the same thing.
    I had exactly the same problem as you but fortunately my router had an option to change the port number that you use to access it. All I did was change it to a different number and then hey presto any requests from inside or outside my lan went straight to my website. Im guessing your stuck if you router doesnt have this option.

    B.
    "Roger your roger Roger, we have clearence Clarence, whats your vector Victor"

Similar Threads

  1. Server 2003 and mail server setup
    By gum digger in forum PressF1
    Replies: 6
    Last Post: 30-09-2008, 11:31 AM
  2. Replies: 9
    Last Post: 10-11-2007, 01:44 PM
  3. router troubles
    By Fergie in forum PressF1
    Replies: 6
    Last Post: 10-06-2007, 10:33 AM
  4. XP Home install troubles.
    By waimaks in forum PressF1
    Replies: 27
    Last Post: 12-07-2005, 09:44 PM
  5. IE Home page troubles
    By fatnakedman in forum PressF1
    Replies: 5
    Last Post: 09-06-2004, 11:00 AM

Posting Permissions

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