Using macmini to sort outgoing lan traffic

Discussion in 'Mac Apps and Mac App Store' started by hoxol, Jul 21, 2011.

  1. hoxol macrumors newbie

    Jul 21, 2011
    Hello, first post forgive my ignorance but this is driving me crazy.

    I have a mac mini server 10.6.8. I am trying to run multiple websites that can be access locally through a legit domain name, lets say the domain and subdomains are registered, and can be forwarded to the WAN IP of the router which forwards traffic to the mini. From the internet all is well.

    However, these same domains need to be accessible without internet service to the router. They must also be accessible from any client connected to the router without modifying the client (no editing the hosts file or proxy). And worst of all the url's must stay, no IP's for access.

    I want each client to be able to type in in their browser and "ask" the mini if it has that url before "asking" the internet (if connected). It doesn't matter if the solution blocks general internet access to the clients.

    The only configuration that has been successful in replicating the desired affect is using a osx client as the webhost, lets say its at I enable apache, set up virtual hosts, the inserting the ip into the other clients as the proxy server. This results in all urls going to that computer, if it has a virtual host for it, the site is served with proper url format. If there is not a virtual host for that url it goes no where. I was able to make an original site and use to return the index pages that I set up in different directories on my "webhost".

    The only problem with this is it requires modification of the other clients to insert the proxy address, and I am not using the server as the webhost. No bueno.

    Is there a re-direct all http requests from clients of the AEBS to the mini running osx server before going elsewhere?? This seems like the best solution if possible.
  2. Panch0 macrumors 6502a

    Feb 23, 2010
    DNS on the mini?

    Have the router pass out the mini server's ip address as the first DNS server to it's DHCP clients. Leave the ISP's DNS Server as the second server.

    All clients will end up asking the mini's DNS service to resolve URLs. If you add entries for, the mini will send the internal IP address to your clients. If the clients ask for for example, they will also ask the mini, but it won't have the address locally, so it will forward the request to an external DNS Server, and your client will end up getting the correct address for the URL.

    I have a mini server at home, and I have set up the DNS and the Router to point to it, but I haven't actually created any entries that I am trying to redirect like this.

    Sorry if that was rambling - getting very sleepy...:)
  3. hoxol thread starter macrumors newbie

    Jul 21, 2011
    I think my problems with this method start at the "add entries". I don't seem to be able to do the whole zones and other dns settings properly. Do you have any suggestions or a screenshot?
  4. Panch0 macrumors 6502a

    Feb 23, 2010
    Like I said, I hadn't set anything up on my mini yet. I had done something similar on a Windows Small Business Server network, and DNS is DNS is DNS, so...

    I had just finished upgradeing from SL Server to Lion Server when I sent the previous post.

    Discovered that Apple had simplified my life by removing erver Admin from Lion Server - Can't find a was to manage DNS entries. Thanks Apple... Luckily google is still my friend and I was able to find "Server Admin Tools 10.7" on apple's support site - they are all still available as a separate download.

    I hadn't done this on SL, but I don't think it would have changed very much...

    Opened Server Admin and expanded DNS.

    Clicked AddZone / Primary Zone
    Named the Zone
    Set the Nameserver Hostname to my Server's name (Including my primary domain, NOT the default of!)
    Saved the zone

    With the new zone highlighted,
    Clicked Add Record / Add Machine (A)
    entered Machine name of (Note the dot at the end - you need that)
    Changed the IP Address to the IP Address of my server (note- I'm using that same server & address a lot here. This could be any address you want your clients to be pointed to).
    Saved the record.

    switched over to my iMac, which is using the mini as it's primary DNS
    opened terminal and entered:

    result was the IP address of my server.

    This is as far as I can test, as I don't have a real web site hosted on my mini, but I think it should work...
  5. hoxol thread starter macrumors newbie

    Jul 21, 2011
    I think it is a problem with the name of my server. On the admin window it is called devserver.local , it seems like it was initially, I must have changed it somewhere along the way. Any ideas on how to change it back?

    the nslookup timed out; no servers could be reached...

  6. Panch0 macrumors 6502a

    Feb 23, 2010
    It sounds like the DNS service is not running, or that the client didn't pick the server up as it's Primary DNS. You should have gotten a response even it it was "Not Found".

    You can add an A Record to the zone for the server - the same IP can be used for multiple entries, although reverse lookup may get wonky.

    Not sure where you are seeing server.local. That sounds like DNS is just not configured at all.
  7. hoxol thread starter macrumors newbie

    Jul 21, 2011
    Thanks for your help, I got it figured out. I think it main problem was not knowing exactly what to put in the DNS fields.

    Do you know the easiest method for doing multiple subdomain, do they require their own primary zone and machine record or can I do a primary and add some kind of alias for and

    Again, thanks for all your help.
  8. Panch0 macrumors 6502a

    Feb 23, 2010
    Are 123 and 465 Machines or subdomains?

    If Machines, you would create either A or CNAME records within the zone.

    If they are sub domains with multiple machines in each, then I think you would not really need the higher zone - you would create separate zones for each of the sub domains.

    Really not too sure. When I did this in Windows, I was able to sort of create folders within a Zone, but I'm not sure what Windows was doing behind the scenes to make that work.
  9. hoxol thread starter macrumors newbie

    Jul 21, 2011
    They are subdomains to sites hosted on the same computer. Only one server will ever be involved. I also need to find the reasonable limit on how many sites I can have on one mini server.

Share This Page