/etc/hosts question

Discussion in 'Installation/Configuration' started by Lord Wodan, Sep 7, 2007.

  1. Lord Wodan

    Lord Wodan New Member

    Ok, Back to the experts.

    After playing around with ISPConfig on a testmachine I want to install it on my server to reduce the powerusage in my house haha.

    This server runs Debian 4.0r1 with Samba Installed. I followed the tuto of Falko. (a perfect......).

    some info:

    Computername : Butler
    Workgroup : MSHOME (yeah, yeah)
    NetBios name : SMBServer
    IP : 192.168.1.110

    Output of hostname : Butler. Output of hostname -f : Butler.MSHOME

    At the start of the tuto I have to edit /etc/hosts

    Code:
    127.0.0.1       localhost.localdomain   localhost
    192.168.0.100   server1.example.com     server1
    
    What do I enter here because server1.example.com is not the output i want from hostname -f

    www.sanders-pit.nl will be the first domain run by mij server but its likely a second one comes soon.

    I have thougt about 2 options:

    Code:
    192.168.1.110 butler.MSHOME butler
    
    or

    Code:
    192.168.1.110 butler.sanders-pit.nl butler
    
    The Samba-config cannot be compromised.

    Any suggestions?
     
  2. chuckl

    chuckl New Member

    The domains hosted on your server are virtual hosts and have nothing to do with the name or domain of the server itself.

    However, for mail end similar services it is necessary that the server be part of a real domain. server1.mydomain.com, shile not original, does have the advantage of being easily extendable when you add a second server.

    On the MSHOME side, I'd change that as rapidly as possible. I don't think you want to connect machines to the internet with MS networking set on default settings.
     
  3. Lord Wodan

    Lord Wodan New Member

    What would be your suggestion?

    Except for changing MSHOME?
     
  4. chuckl

    chuckl New Member

    If you are hosting sites for the greater internet rather than a corporate or closed network, your server has to have a full qualified domain name that is recognisable on the internet through DNS etc.
    This because it has to be findable for websites and ftp and the like, and will almost certainly be sending and receiving mail, RSS feeds and anything else you can think of.
    So a valid registered domain and a server name tacked onto that are about a minimum requirement, with the server included in the DNS system somewhere.
    That said, I think I'm right in saying that the ISPConfig setup places great store on the hosts and hostname files because Postfix uses them tho generate its mail responses.
    I would imagine that with a bit of editing of the Postfix main.cf, you could fix that. I'm not aware of any other implications, but I think Falko and co are a lot better qualified to comment on that than I am.
    I would certainly experiment and investigate fairly closely before jumping in to a particular solution.
     
  5. Lord Wodan

    Lord Wodan New Member

    so?

    which answer..?


    i am not corporate...
     
  6. chuckl

    chuckl New Member

    In a small business or home environment, a typical installation would be that you have a broadband line and a modem router, which can be set to forward incoming traffic like web requests to a single internal IP address e.g. your server.
    If all the websites hosted on that server have their DNS correctly set up then there is no particular need for the server itself to be an 'internet' machine rather than a 'local network' machine. A similar effect is obtained when larger organisations use proxy servers and load balancers with backend web servers.

    Problems can arise with things like mail, where the server does have to have a defined internet presence, but this is also solvable for low volumes. For instance, it is possible to set up a Postfix mail server to use Gmail or Google Apps for mail, logging on as though it is a mail client rather than a mail server, and let an external mail server do the mail delivery.

    So, in a restricted setup , you can do thisfairly easily, the problems occur when you want to widen the scope, as it is not scalable. But it can certainly be made to work, and in that sense, feel free to name the machine whatever you want, with the understanding that Microsoft workgroup or domain network names and DNS network names are not the same thing. Calling your server server1.mshome is not going to work on the internet, it's not a domain name. Calling it server1.mydomain.com is. However, if your server is not diectly connected to the internet, it is accessed by IP address, so the name is irrelevant.
    On your home/sbs network with an mshome workgroup and Samba it's a different story, as that is controlled by workgroup/domain machines, users and permissions.
    In your examples above, the second is the correct option, as it's a correct domain name. None of it is cast in stone however. If you use the second option and you find your Samba shares no longer work, edit the files and return it to it's original settings.
     
  7. Lord Wodan

    Lord Wodan New Member

    Ok, thanks for your answer.

    I will try the second one and see if my shares still work.

    Basicly, I still need 2 pc's to do it correctly? One as my fileserver (samba) and one for ISPConfig. Let 1 pc do both is not very handy? is that what you say?

    I am using a router an as mentioned, the fileserver has 192.168.1.110.
     

Share This Page