Re: IP routing with remote DNS, but server & client on same subnet - how?



On Oct 17, 12:30 pm, Pascal Hambourg <boite-a-s...@xxxxxxxxxxxxxxx>
wrote:
Hello,

Randy Brick MacKenna a écrit :





1. With the cable modem plugged in, I surfed to my websitewww.foodomain.net
(which is a server on my home network)
2. I surfed to a link to a large document (32Meg)
3. *Before* clicking on the link, I unplugged the cable modem
(disconnecting from the internet)
4. I clicked on the file link -- and it timed out, server
unreachable.

Next experiment:

1. With the cable modem plugged in, I surfed to my websitewww.foodomain.net
2. I surfed to a link to a large document (32Meg)
3. I *first* clicked on the link, then during the file transfer, I
unplugged the cable modem
4. The file transfer completed successfully!

So, from this I deduce that the internet connection is required only
for DNS -- but after that the actual routing of packets from the
server and the client (all within my home network) do not involve the
internet connect

IHMO this sounds a bit optimistic.

First, I believe there is more than just DNS. If you browsed the website
before unplugging the cable, it is likely that the DNS resolution was
already cached by the client. You said in your first post that you told
your registrar to redirectwww.foodomain.netto
[your.public.ip.address]:32004. DNS does not handle ports (neither does
the the "hosts" file), so I guess there is some form of web indirection
(HTTP redirect, frame...) performed not by a DNS server but by a web
server hostingwww.foodomain.netoperated by your registrar. So I guess
the path is as follows :

1) User browses URL <http://www.foodomain.net/some/file>.
2) Browser sends a DNS query asking for the IP address of host
"www.foodomain.net".
3) DNS replies with the IP address of a registrar's web server.
4) Browser connects to that IP address on port 80 and asks for
"/some/file" on host "www.foodomain.net".
5) Web server replies that the document is actually at URL
<http://[your.public.ip.address]:32004/some/file>.
6) Browser connects to your.public.ip.address on port 32004.
7) Router transparently forwards the connection to 192.168.1.10.
8) Browser asks for page "/some/file" on that connection.

So, even though you cache the DNS resolution forwww.foodomain.net, you
still need the internet connection in order to use the web redirection
performed by your registrar.

Second, even though your second test was successul, as Stefan wrote, the
port forwarding rule on the router may be bound to the internet link
state. I'll take for example the way the port forwarding is done in
Linux - I believe some Linksys routers run Linux. The port forwarding
rules is used only for the first packet of the redirected connection ;
then a NAT mapping is created for all other packets of that connection.
So if the transfer has started before the port forwarding rule is
removed, it does not stop. But any subsequent new HTTP connection will
fail because the port forwarding rule does not exist any more.

A workaround to all this would be a local DNS server resolvingwww.foodomain.netinto the private web server address and having the web
server listening on port 80.

Thanks...this makes sense to me. And you are right, any subsequent
HTTP requests will fail after I pulled the plug on the cable modem.
So, perhaps if the cable were left plugged in then the traffic indeed
may go out through my ISP.

I tell you, though, there is a noticeable speed difference when I'm on
my home network compared to when I'm outside my home, connected back
into my home-based Linux web server. So much faster that it seems to
me that traffic 'feels' like it is staying in my local network.

So, are you saying to really end the uncertainty, that if I ran a DNS
on my little Linux box, I could set it to always 'catch' www.foodomain.net
and point it to Apache, listening at 192.168.1.10:32004?

(note: I don't use port 80, since when I really do want to get to
this Apache server from the outside, I need to use a different port --
since my ISP blocks hosted traffic on port 80)

So...it sounds like configuring a DNS on my Linux machine might be the
trick (?) I wonder how hard that is...hmmm...

Thanks again,
Randy

.



Relevant Pages

  • Re: Cant access web on local network server
    ... Yes my Windows 2003 R2 Standard Server is a DC domain controller. ... How do I open DNS for the outside? ... What port should I give access to? ...
    (microsoft.public.windows.server.general)
  • Virtual host "lite"?
    ... redirect an incoming we request based on DNS name, ... "http://webmail.domain.com " will automatically be redirected to port ... fall over and the Boss works out what a "server" is.. ...
    (comp.os.linux.networking)
  • Re: Please help confused iptables user
    ... >> system talk to a remote 22. ... First rule says allow IN anything destined for your IP port 22. ... >> about DNS, asking remote servers if they'll accept your OUTBOUND mail), ... the "remote" DNS server is on the same network, ...
    (comp.security.firewalls)
  • Re: Setting up website on my DSL
    ... Well when I telnet to www.geewhizbang.com on port 80 I get something listening there. ... I assume you are doing a port forward on your router for port 80 to your web server. ... Just go into the andanved TCP/IP properties of the NIC on the DNS tab and untick the "Register this connection in DNS" This will make the errors go away. ...
    (microsoft.public.windows.server.dns)
  • Re: SRV RRs support in Internet Explorer?
    ... It had a remaining dynamic port bias, which it shouldn't have had, and was ... and MS DNS Server could then be as follows: ... > web access from a client to web server and, to keep things simple, also ...
    (microsoft.public.win2000.dns)