Koozali.org: home of the SME Server

How is SME Server's host name known by the LAN?

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
How is SME Server's host name known by the LAN?
« on: November 18, 2008, 06:41:13 PM »
I am running SME Server on a small LAN and I found that on my Windows machines I can reach SME Server by the host name.  For example "http://SMEHostName" brings up the primary site for SME Server where SMEHostName is the name that I have given the computer.

How do my Windows machines come to know the host name of my SME Server?  My Fedora Linux machine does not resolve the name at all.  The LAN is based around a Smoothwall Express Linux router that is open to UPnP.  Does it play a role?

Offline Boris

  • *
  • 783
  • +0/-0
Re: How is SME Server's host name known by the LAN?
« Reply #1 on: November 18, 2008, 08:30:14 PM »
In short, name configured in "workgroup" menu of server-manager is samba (netbios) name of the computer. It can be changed to be different from DNS host name given during installation.
Windows computers resolve names to IP by different means. They can use WINS (if configured), lmhosts, hosts or direct broadcast. In your case since all the computers are on the same subnet and possibly in the same windows workgroup, samba server on SME server participates in browse-master election process and announce its netbios name to all surrounding computers. Windows computers understand this and can resolve netbios name to IP of the SME server.
Reading more about windows networking will help you to understand deeper name resolution and windows networking basics.
...

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #2 on: November 18, 2008, 10:21:47 PM »
Thanks, I guess that covers it unless anybody else has anything else to add.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: How is SME Server's host name known by the LAN?
« Reply #3 on: November 19, 2008, 01:47:45 AM »
My Fedora Linux machine does not resolve the name at all.  The LAN is based around a Smoothwall Express Linux router that is open to UPnP.  Does it play a role?

The linux machine will resolve via DNS and is probably obtaining DHCP and DNS information from the Smoothwall router. Unless you tell the Smoothwall router about the SME server's name and address it won't be resolvable via DNS.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Now SME informs about dynamic domain names
« Reply #4 on: December 05, 2008, 09:01:16 PM »
I've just tried something with some similar puzzling results.  I have used a dynamic domain service, www.dyndns.com service, to create a few dynamically updated domain names.  I noticed by chance that in the server-manager, under "Configuration" there is the option to add domain names.  I tried adding the dynamic domain names to the list there and specified that content would be directed to a few of my iBays.  I was amazed to find that these iBays could be reached directly with the added domain names without using the iBay directory from the internet.

Where out there on the internet are these names resolved?  I have to use port forwarding to get past my router to the various computers on my LAN.  Try these names to see what I mean,

http://integratech.dnsalias.com:90/

http://kleartech.dyndns.org:90/

The content in both cases is from content on different iBays on the same host specified somewhere in SME.  Try both addresses without the port added, or add either the ports :80 or :95 to see some different content on other machines in my LAN. (I'll try to leave the other three computers on, otherwise 0600-1600 PST.) Use any other port setting besides :90 and the two names resolve the same way.  Post if you get different results.

How is it a setting done in server-manager->Configuration->Domains find its way to the internet?  If this is possible, it seems to me that there should be a way to direct these different names to different computers on my LAN without using port forwarding.

Can anyone explain this?  Meanwhile I am amazed again at the utility of this excellent little server.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Port forwarding here in this case is not managed by SME
« Reply #5 on: December 05, 2008, 09:17:34 PM »
I should add again that SME is not my router, I use SmoothWall Express as my router.  Port forwarding is done there.

www.smoothwall.org

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Now SME informs about dynamic domain names
« Reply #6 on: December 06, 2008, 02:15:13 AM »
LANMonkey

sme is not a little server, it is a powerful replacement for Windows servers, webservers, mail servers etc.

Quote
I was amazed to find that these iBays could be reached directly with the added domain names without using the iBay directory from the internet. Where out there on the internet are these names resolved?

That is standard functionality, ie hosting of multiple domains on the one web server.

Domain names can be configured to resolve locally, which provides local access from your network, but not from external users.

You need to add external DNS records to point those domains at your sme server external IP, or in your case, your routers external IP.

sme server & your network will be easier to use/configure if you do away with an external router/firewall and configure your sme in server gateway mode.

I think you need to read ALL the manuals, have you done that yet,
http://wiki.contribs.org/Main_Page

in particular see this section
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Appendix



Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Now SME informs about dynamic domain names
« Reply #7 on: December 06, 2008, 07:10:45 AM »
If this is possible, it seems to me that there should be a way to direct these different names to different computers on my LAN without using port forwarding.

Yes, that's possible, but not (currently) via the server manager. You need to use ProxyPass settings to configure that. Search here for details.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Now SME informs about dynamic domain names
« Reply #8 on: December 06, 2008, 02:23:04 PM »
Yes, that's possible, but not (currently) via the server manager. You need to use ProxyPass settings to configure that. Search here for details.
Or, go directly here for details ;-): http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #9 on: December 06, 2008, 06:40:16 PM »
That is standard functionality, ie hosting of multiple domains on the one web server.

Domain names can be configured to resolve locally, which provides local access from your network, but not from external users.

You need to add external DNS records to point those domains at your sme server external IP, or in your case, your routers external IP.

Yes, I understand how a web server can host multiple domains.  I also neglected to point out that the domains I added were configured to "resolve locally".  I tried the "internet DNS servers" option and could not reach the sites even on my LAN.

You say that external users cannot resolve the names as configured?  Did you try the links I posted?  Here they are again,

http://integratech.dnsalias.com:90

http://kleartech.dyndns.org:90

They should yield two different content management test sites on the same server.  I recall testing them outside my LAN and I got the two different sites.  I'll check again to make sure this afternoon.  Somebody please report to me what they are getting out there.

Yes, that's possible, but not (currently) via the server manager. You need to use ProxyPass settings to configure that. Search here for details.

It is not entirely clear from the linked documentation, does ProxyPass require SME to be situated as a gateway server?

cactus, thank you for that link.

I still assume that the domain names as I have set resolve differently outside my LAN.  Unless contradicted, I'd still like know how this works.  Shouldn't DNS be playing a role?  It looks like SME's DNS has assumed some authority out there on the internet.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How is SME Server's host name known by the LAN?
« Reply #10 on: December 06, 2008, 06:44:51 PM »
You say that external users cannot resolve the names as configured?  Did you try the links I posted?  Here they are again,

http://integratech.dnsalias.com:90

http://kleartech.dyndns.org:90

They should yield two different content management test sites on the same server.  I recall testing them outside my LAN and I got the two different sites.  I'll check again to make sure this afternoon.  Somebody please report to me what they are getting out there.
That is something you can do yourself, for instance by using this: http://www.megaproxy.com/freesurf/

Edit: Although the portnumber thingy seems not accepted in this case. I am indeed able to resolve your addresses.
« Last Edit: December 06, 2008, 06:47:30 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: How is SME Server's host name known by the LAN?
« Reply #11 on: December 06, 2008, 07:15:29 PM »
It is not entirely clear from the linked documentation, does ProxyPass require SME to be situated as a gateway server?
No. ProxyPass is done by Apache and must be configured on the server the gateway forwards the http(s) port to.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #12 on: December 06, 2008, 08:55:04 PM »
Let me see if I got this down.

What I want is to change access to the two iBays so that instead of reaching them this way,

http://integratech.dnsalias.com:90

http://kleartech.dyndns.org:90

I can reach them this way,

http://integratech.dnsalias.com

http://kleartech.dyndns.org

As it stands now, if you try to reach those two addresses without the specified ports, then you reach my Windows Home Server, which got me started with a place on the internet,  http://symbiota.homeserver.com.  I continue to have my SmoothWall forward basic :80 requests to that server so that

http://integratech.dnsalias.com

http://kleartech.dyndns.org

http://symbiota.homeserver.com

all resolve to the same server.

ProxyPass will allow me to access three different websites in my LAN with those three different names.  Correct?

It is still amazing to me that the two port directed sites are resolved differently, outside the LAN, to two different websites.  My dynamic DNS service provides as many different aliases as I ask for for my one changeable ISP provided IP address.  But now, due to some process on the SME server inside the LAN where this IP address has no meaning, not only are the port redirected addresses resolved differently, but I can eliminate the port redirection altogether and use them as regular addresses.

If I had more than one IP address provided from my ISP for my one connection, I could easily see how I could redirect different domain names to the different sites on my LAN.  But that is something being managed outside the LAN.  Now SME provides a setting inside the LAN that effects access from outside the LAN.

Again, how is this possible?


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How is SME Server's host name known by the LAN?
« Reply #13 on: December 07, 2008, 01:28:07 AM »
LANMonkey

Quote
...the domains I added were configured to "resolve locally".

That's why you can resolve them locally, as the sme server is providing DNS information locally.

Both these URLs resolve OK, but that's not what you want.
http://integratech.dnsalias.com:90
http://kleartech.dyndns.org:90

Quote
As it stands now, if you try to reach those two addresses without the specified ports, then you reach my Windows Home Server, which got me started with a place on the internet,  http://symbiota.homeserver.com.  I continue to have my SmoothWall forward basic :80 requests to that server so that
http://integratech.dnsalias.com
http://kleartech.dyndns.org
http://symbiota.homeserver.com
all resolve to the same server.

Your seperate firewall is adding additional complication to your network, although it's acceptable to use it. Unless you have a specific need for that particular firewall functionality wise, then it will be easier to reconfigure sme & your network ie modem/router, and let sme be the firewall ie in server gateway mode. It's not absolutely necessary though.

Do it with your present arrangement as follows.
At present all port 80 requests get forwarded to your Windows server due to the way you have configured your firewall.

To achieve what you want, you need to forward all port 80 requests to your sme server, and then configure sme to host those first two domains in ibays, and use proxy pass to redirect http://symbiota.homeserver.com to your Windows server.

Let sme be  the "master" web server.
« Last Edit: December 07, 2008, 01:30:14 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #14 on: December 09, 2008, 08:08:38 PM »
....

To achieve what you want, you need to forward all port 80 requests to your sme server, and then configure sme to host those first two domains in ibays, and use proxy pass to redirect http://symbiota.homeserver.com to your Windows server.

Let sme be  the "master" web server.

Yes, I tried this and it worked like a charm.  All of Windows Home Server functions check out except the router configuration under Settings -> Remote Access, "Verifying that your router is accepting Web site connections" shows a warning flag.  But that's a trivial issue and I'm satisfied I've got things where I want them respecting WHS.

It occured to me that the WHS IIS might do the same job.  IIS will take headers for virtual websites when you run multiple websites on IIS.  From there you might just redirect to SME's websites, although you wouldn't be able to take advantage of SME's ability to forward content to the iBays.  Unfortunately WHS's IIS is running HTTPS in order to manage its remote access feature and it is a feature of IIS that it cannot use headers (this.is.aheader.com) when running secure, HTTPS sites.

But you can use multiple IP addresses when running an HTTPS server on IIS.  (They say the performance is a little slow, no matter for me.).  And now I can use ProxyPass to direct dynamic domain names to multiple websites on WHS with these IP addresses.  (You must also configure your network connections so that your machine also has the additional IP addresses available.)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #15 on: December 09, 2008, 08:13:03 PM »
And what about the mysterious passing of the domain name accross the router?  If SME were doing it all by itself, then that's suspicious based on what I know about IP addresses, DNS and the rest -- however limited.  But I can see that IIS can do the same thing, so somewhere the domain name is traveling along with the IP address.  Maybe in the "application layer" of TCP/IP?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How is SME Server's host name known by the LAN?
« Reply #16 on: December 09, 2008, 11:27:40 PM »
And what about the mysterious passing of the domain name accross the router?  If SME were doing it all by itself, then that's suspicious based on what I know about IP addresses, DNS and the rest -- however limited.  But I can see that IIS can do the same thing, so somewhere the domain name is traveling along with the IP address.  Maybe in the "application layer" of TCP/IP?
No, your questions are way out of the scope of SME Server, if you are really looking for the technical details you should read the concerning RFC documents that describe the standards. Computers are only known by there IP number in the computer world, the hostname is a translation (easier for users). In the basic a list of hostnames and there correlated IP numbers is registered on the DNS server. All systems know which is the DNS Server they should look for (either this is configured explicitly or by dynamic settings when they receive their IP number). They ask which IP Number belongs to the hostname and in turn try to contact the IP number that is communicated back to them from the DNS.

My advice is to read up on basic networking principles if you are really interested in the technical background. Here is a list of DNS related RFC documents: http://www.dns.net/dnsrd/rfc/
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #17 on: December 10, 2008, 01:06:22 AM »
That's a pretty technical reference to a simple question.

I think I understand the basics.  For HTTP, for example, the client browser gets a domain name and then goes out looking for a DNS server to give it an IP address that is represented by the name.  It then uses that IP address to get the page it wants.  For example, I can use an IP address directly on my LAN to get a page from one of my servers, "192.168.0.123/index.htm".

When I use a router with NAT, or something like it and my ISP connection has an address then if I can get a domain name out there for the IP address of that connection, then somebody out there on the internet can make an inquiry to that name and expect that if the router had a website, the router might give a page in response.

But also the router can forward the request to another server in the LAN using the internal private IP addresses of the servers.  But say there are two servers, then the router can only forward to one unless a different port is requested by the outside request along with the router's IP address and this different port is forwarded to the second server.  I've set up my LAN like this myself.

What comes next is you can assign more than one name to the same IP address for the router's ISP connection.  But since the router is only dealing in IP addresses, then how can different domain names be assigned to different IP addresses in the LAN?  Yet I can see that my LAN is set up so that a web server can distinguish between domain name requests that have been made from outside the LAN.  Somewhere information about the domain name must be crossing into the LAN else the web server cannot redirect the request to either a virtual website or another server on the LAN which is what I am doing here.

The technical details of how this occurs must be reduced to a simple answer to a simple question, "How does information about the external domain name request cross over the router into the LAN?"  Either it comes along with the actual traffic, or somehow the webserver is communicating with a DNS somwhere, or ... ?


Offline Boris

  • *
  • 783
  • +0/-0
Re: How is SME Server's host name known by the LAN?
« Reply #18 on: December 10, 2008, 04:30:00 AM »
The technical details of how this occurs must be reduced to a simple answer to a simple question, "How does information about the external domain name request cross over the router into the LAN?"  Either it comes along with the actual traffic, or somehow the webserver is communicating with a DNS somwhere, or ... ?
Here is your simple(r) answer:
Nobody on the Internet knows about your internal LAN layout. The most outside DNS server can do is to direct all requests for domain.name to your current ISP assigned IP. That is external IP of your router. Your NAT router can only pass traffic to internal host by port destination unless it really smart and more complicated that simple residential grade router/gateway/firewall. All http (80) traffic can be directed to single internal host regardless of HTTP header, that include the actual domain.name of the webpage requested. There is nothing so far that knows how to read the http on the application level and direct traffic to correct internal host.

Now that request came (hopefully) to your web server, it reads the request and decide if it can be served from the local folder,  rejected or served from the other web server via proxypass.
Again, until packet reaches the application that can decode HTTP (webserver, proxy server or similar), it only operates on the network layer. Firewall that uses reverse proxy protocol could help you, but its not the scope of this discussion. Simple (but effective) proxy based redirection is offered to you via proxypass directive on SME.
...

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #19 on: December 10, 2008, 05:05:23 PM »
Here is your simple(r) answer:
Nobody on the Internet knows about your internal LAN layout. The most outside DNS server can do is to direct all requests for domain.name to your current ISP assigned IP. That is external IP of your router. Your NAT router can only pass traffic to internal host by port destination unless it really smart and more complicated that simple residential grade router/gateway/firewall. All http (80) traffic can be directed to single internal host regardless of HTTP header, that include the actual domain.name of the webpage requested. There is nothing so far that knows how to read the http on the application level and direct traffic to correct internal host.

Now that request came (hopefully) to your web server, it reads the request and decide if it can be served from the local folder,  rejected or served from the other web server via proxypass.
Again, until packet reaches the application that can decode HTTP (webserver, proxy server or similar), it only operates on the network layer. Firewall that uses reverse proxy protocol could help you, but its not the scope of this discussion. Simple (but effective) proxy based redirection is offered to you via proxypass directive on SME.

OK, indirectly, that delivers the final clue, "HTTP Headers".  This is what goes along with the request that delivers up the domain name accross the router and independent of the IP address.

http://en.wikipedia.org/wiki/HTTP_header

http://en.wikipedia.org/wiki/Virtual_hosting

The answer to the question, "How does information about the external domain name request cross over the router into the LAN?" is "The domain name is the 'host' part of the HTTP request header.  It is the request that carries this information.  The IP address is just the place to deliver the request."

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #20 on: June 15, 2011, 07:38:50 PM »
Two and a half years later and I am back again going over this bit of correspondence.  Smoothwall is out, SME is my gateway and I was trying to forward an incoming port to a second computer on the LAN and I assumed that web-manager's security option would be doing that.  It doesn't.  It forwards incoming ports to another port on the same computer.

As mentioned above, I need ProxyPass:

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How is SME Server's host name known by the LAN?
« Reply #21 on: June 15, 2011, 07:46:09 PM »
As mentioned above, I need ProxyPass:

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass
Perhaps, but what is you question? Why are you reviving this thread with above information?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #22 on: June 15, 2011, 09:13:33 PM »
I was just making a note for reference sake.  It was not my intention to revive the thread.  I frequently use this site for a reference as I am expected to do.  Sometimes, even with an old thread, I'll add that the thread solved my problem too.

If the post was a problem, go ahead and delete it.

Maybe it should be an option to post a reply without moving it to the top of the que.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How is SME Server's host name known by the LAN?
« Reply #23 on: June 15, 2011, 09:16:20 PM »
If the post was a problem, go ahead and delete it.
It was not a problem, it was merely wondering if you perhaps had issues implementing the proxypass configuration, but it seems you used it successfully:

I'll add that the thread solved my problem too.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: How is SME Server's host name known by the LAN?
« Reply #24 on: June 15, 2011, 09:21:59 PM »
Thank you for your concern.  I haven't even looked into it yet, but I don't anticipate any problems.  If I have to come back for help, I'll start a new thread.