1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

setting up my own nameserver

Discussion in 'Web Design and Development' started by mcgarry, Jan 6, 2005.

  1. macrumors 6502a


    I have:
    - an extra OS X computer that I can leave on 24/7
    - a static IP ADSL account
    - a few TLDs to my name
    - extremely low site traffic expectations ... friends and family, that sort of thing

    I want:
    - To be able to host my own website from my house

    I don't know how to:
    - Well, a lot of things. I have played around enough to have set my router to allow port forwarding on port 80 to the internal IP address of the machine I want to be the host/nameserver, and have tested that this works from another computer on my LAN (when I type in its IP address, I get the Apache test page). I don't know if this means much, but it works. Now I need to be able to tell the rest of the world that when they type in my www.[my tld].com, it should go to my router and its static IP, which will then sent the port 80 traffic along to the Mac doing the hosting.

    SO, how do I do this? Do I have to register my computer as a nameserver somewhere? I know how to tell my registrar where to look, but I don't know how to create a ns.[my tld].com.

    I am not proposing to be my own host for anything approaching a commercial-grade website, this thing would get a few hits a month.

    Thanks for any advice, especially for pointing out the obvious things I have missed or of which I am totally unaware. As you can probably tell, I don't really know what I am doing, but I think I know enough to give it a shot.

    These sites looked promising, but didn't address my nameserver questions:
    osx.hyperjeff.net/Articles/Named_Serving.html (apparently crucial broken link)
  2. macrumors 601


    since, as you admit, you don't know what you're doing, may i suggest an alternative?

    for one of my sites, i use the free DNS service http://www.zoneedit.com/

    it sounds like you're got everything else set up right, so i bet you can figure out the zoneedit stuff.

    the really messy stuff will be when you decide you want to set up email servers on your mac. that's something i was never able to get going w/ osx (though i understand it's a lot easier on osx server, which makes me wonder if apple intentionally broke it on "normal" osx).

    mind you, i got close, but i couldn't figure out how to tell the sendmail program that the name of my machine was my domain name, not foo.local. argh.

    anyway -- check out zoneedit.
  3. macrumors 68040



    You guessed that right. That is why OS X Server exists plus it has some very powerful features and monitoring tools. :)
  4. macrumors 65816



    It just Terminal'ed:

    sudo postfix start
    and it allowed me to send mail through the 'localhost' server. There was no router though.

    The big problem is however, many POP/IMAP servers don't like 'anonymous' mail servers as they are also used by spammers.
  5. macrumors 601


    it was telling sendmail the name of my machine that was the problem. i made (what i believe are) all the correct configuration changes, but every time i sent email, the return address would be foo@bar.local, even though i told it the domain was bar.com.

    receiving mail worked fine. and it did send the mail, but w/ the wrong return address.
  6. jsw
    Moderator emeritus


    FWIW, as an alternative, http://www.dyndns.org works well for me.
  7. macrumors 6502a


    OK, leaving sendmail aside for the moment,

    www.dyndns.org/services/statdns/ says that they will point me for free to a xxx.dyndns.org -type address. I want to use my own domain names if possible.

    zoneedit's services seem geared towards dynamic IP customers --- I guess it wills till work with my static IP, and just never change ?

    Are these services free out of the goodness of their hearts? I read the faq on ZoneEdit's site, and it has a pricing scheme based on usage. I'm sure I won't hit it, but they also mention www.granitecanyon.com/ as a totally free service. Anyone used that for what I''m trying to do?
  8. macrumors 6502

    I run my own DNS using djbdns (Please don't use BIND, it's old and scary and broken) and I'll tell you, if you don't know what you're doing, don't get into DNS. Just use zoneedit. I use it as a backup. Their pricing structure I thought was just for when you need more than the five free domains they offer.

    PS: I also have static IPs and zoneedit works just fine.
  9. macrumors regular

    You definitely don't need to run your own nameserver or DNS just to host your own website(s). In fact, that would be huge overkill.

    Where did you register your domain names? Usually the same company you register your names with offers nameserver services. I use www.easydns.com, simply because they've got a real simple web interface, and they register you with their nameservers at no additional cost. If you're telling your registrar where to look already, odds are all you need to do is configure Apache and the Web is already pointing to the correct computer.

    For somebody who's just learning, simply getting the Apache server and any extensions running is enough to keep track of. I recommend keeping BIND and DNS out of your head for now.

  10. macrumors 6502a


    Ok, yes doing my own dns is overkill, and there are good free services available. And oh yeah, I could learn a wee bit more first.

    I just set up an acount with everydns.net. I already own 5 tlds (for no good reason), so I thought going with zoneedit might prove limiting. Anyone know any reason I shouldn't use everydns.net?

    If I ever do anything even mildly interesting with any of my domain names, I will of course look at real, external hosting options, but I am curious to try this.
  11. macrumors 601


    granitecanyon is good if you can program DNS configs by hand. zoneedit gives you a bunch of edit screens and good examples. granitecanyon gives you a text window (at least it did a few years ago, when i was looking at it).

    when i was hosting out of my house, i had a static IP, and zoneedit worked fine for that. i don't know how/if they handle dynamic IPs.
  12. jsw
    Moderator emeritus


    DynDNS.org is totally free. I've used them for a year, no charges, no credit card info, nothing. All I need to do is make sure once a month or so that I go to the site and verify my info, which can be done automatically.

    Edit: not trying to promote DynDNS, just saying that it has worked for me, no problems at all. YMMV.
  13. macrumors newbie


    Use this site. They will allow you to use your own Domain name (www.whateveryyourdomain.???) instead of a subdomain (yourname.thissucks.???). And, it's FREE....

  14. macrumors 601

    What? Two of your issues (old and scary) aren't even issues, just opinions. So how is it broken? I've never had any issues with it, if configured properly.

    DNS isn't rocket science; you just need to understand the terminology.


    Back on topic, when you register your domain names, you can specify the DNS servers who will be authoritative for it. You can specify your DNS server in there, or you can specify another DNS server if you will host it elsewhere. After doing that, simply configure DNS at your site and allow UDP/TCP port 53 into your DNS server.

    As for Postfix, you need to configure a few options. First, read and understand the many configuration options in /etc/postfix/main.cf. Here are some you will want to set properly:


    and then all of the *restrictions options. You can get a feel for these at http://www.postfix.org.

Share This Page