8 Replies Latest reply: Feb 14, 2013 8:53 PM by John Lockwood
mike.it Level 1 Level 1 (0 points)

Hi I'm kind of new to this.

 

I got my web server working exteranlly, but within my internal network, the webserver only works if I input the actual ip address and not www.example.com.

I have a Cisco RVS4000 set as a gateway and a Mac Mini with Server App 10.8x. My guess is that I have to enable some port. I followed the well known TCP/UDP Ports (https://discussions.apple.com/article/TS1629), but I still can't get it to work internally.

 

Any thoughts on why it's not working interanlly?

 

Thank you,


Mac mini, OS X Mountain Lion (10.8.2), Mac OS X Server App
  • 1. Re: Web server works externally, but not internally
    iToaster Level 3 Level 3 (670 points)

    if your web server is not responding when browsing via name on the LAN and browsing via IP address works

    it's probably a DNS problem

  • 2. Re: Web server works externally, but not internally
    John Lockwood Level 5 Level 5 (5,370 points)

    You are probably running your own internal DNS server, probably in order to run Open Directory. If you like many have used the same company domain name for the internal network as your website uses externally then this is a common configuration called a 'Split Horizon DNS'.

     

    The outside i.e. the Internet will be using a DNS server on the Internet to resolve your website e.g. www.company.com often this domain record is hosted by your ISP or web hosting firm. Your internal network is using your Mac server. What you need to do is add a record to your internal DNS server for www.company.com with the correct external public IP address. This way when internal users ask your internal DNS server to resolve that name it will answer correctly.

  • 3. Re: Web server works externally, but not internally
    mike.it Level 1 Level 1 (0 points)

    Thank you John. I'll look into this and see if this was the problem.

  • 4. Re: Web server works externally, but not internally
    mike.it Level 1 Level 1 (0 points)

    Screen Shot 2013-02-14 at 11.25.19 AM.png

     

    So I added the hosted ip to the machine record. Still no luck with the web working internally. I added an image to show how our network is set up.

  • 5. Re: Web server works externally, but not internally
    John Lockwood Level 5 Level 5 (5,370 points)

    Check the following.

     

    1. On a Mac on your internal LAN, what is the IP address of the DNS server it is using. This is probably your Mac server. If it is the Mac server then do the next check.

     

    2. On the Mac server is the DNS service running. If so does it have a DNS zone (aka. Domain) defined the same as the domain name of the external web server. If the webserver is www.company.com then the domain name/zone is company.com. It does not have to have the same domain defined but if it does (as I suspect) then it needs a www.company.com A record (aka. machine record) defined which needs the external IP address of web site.

     

    So if your web servers Internet IP address is 88.88.88.88 then you would need on your internal Mac DNS server a machine record linking www.company.com to 88.88.88.88

     

    Try using Network Utility on the Mac server to lookup your webserver e.g. www.company.com

  • 6. Re: Web server works externally, but not internally
    mike.it Level 1 Level 1 (0 points)

    OMG!! Thank you John. It worked!!! : )

  • 7. Re: Web server works externally, but not internally
    mike.it Level 1 Level 1 (0 points)

    Lol...After fixing one issue, another one came up. This time it has to do with the name I am using. For example:

    www.exmaple.com and tm1.example.com (both are hosted with different ips)

     

    Since they are both using the same name: exmaple.com, I cannot access the www.exmaple.com, but I can access the tm1.example.com

     

    You have been a great help John, is there anyway to fix this?

     

    Thank you

     

     

     

    Screen Shot 2013-02-14 at 4.14.48 PM.png

  • 8. Re: Web server works externally, but not internally
    John Lockwood Level 5 Level 5 (5,370 points)

    From your diagram tm1.example.com looks like it is an internal server, you therefore need to define it on your internal Mac DNS server as an A (machine) record with the IP address being the internal private IP address.

     

    I am guessing it is a Time Machine server.

     

    If you want to use two different names for the same server (and therefore same IP address), the first name uses an A (machine) record, the second name uses a Cname (alias) record and points to the first name.