Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > OSX Server: Can't navigate to hosted Web Site behind router. Mail also "broken"

OSX Server: Can't navigate to hosted Web Site behind router. Mail also "broken"
Thread Tools
Fresh-Faced Recruit
Join Date: Jun 2003
Location: New Zealand
Status: Offline
Reply With Quote
Jun 5, 2003, 05:30 PM
 
I am setting up OS X Server for educational and personal use and am having a few difficulties.

What I have:
I have an ADSL/Ethernet router with two Macs and an Airport attached. One of the Macs is the OS X Server.

I have a static IP and domain name registered with my ISP.
I have the server on a static IP that is valid for my LAN. The router is set up to route any TCP activity on port 80 to my server.

Problem:
From my LAN, When I enter www.mydomain.com into a browser, I get nothing. If I enter the local IP address of my server, I see the web site.

If I dial in to an ISP and navigate to www.mydomain.com, I see my web site.

Why can't I navigate to my web site from my LAN using the URL?
Mail is also not working, can't send mail to Internet using user@mydomain.com...



KiwiKen
     
Mac Elite
Join Date: Nov 2001
Status: Offline
Reply With Quote
Jun 5, 2003, 09:59 PM
 
Originally posted by KiwiKen:
I am setting up OS X Server for educational and personal use and am having a few difficulties.

What I have:
I have an ADSL/Ethernet router with two Macs and an Airport attached. One of the Macs is the OS X Server.

I have a static IP and domain name registered with my ISP.
I have the server on a static IP that is valid for my LAN. The router is set up to route any TCP activity on port 80 to my server.

Problem:
From my LAN, When I enter www.mydomain.com into a browser, I get nothing. If I enter the local IP address of my server, I see the web site.

If I dial in to an ISP and navigate to www.mydomain.com, I see my web site.

Why can't I navigate to my web site from my LAN using the URL?
Mail is also not working, can't send mail to Internet using user@mydomain.com...



KiwiKen
This indicates that DNS is screwed up in some way. What are you using for your DNS server? When you "navigate to it from the LAN" what are you using on the client machine for an IP?

You can try the "Network Utility" application in Applications/Utilities. There's a "lookup" tab which should show how it's getting the DNS info.

If all else fails, go to your "/etc/hosts" file (you must edit it with superuser privileges) and add a line like this

17.107.17.77 myhostname myhostname.mydomain.com

Where the IP is your IP and the hostname is of course, your hostname.

Put this on the client machine, using your static assigned IP. This file is checked before the DNS lookup, so the problem will go away.
     
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status: Offline
Reply With Quote
Jun 5, 2003, 10:58 PM
 
IMHO, the problem is probably with NAT on the router.

Your domain name resolves to the IP of the router. This can present some problems with packet forwarding (most likely, only the external interface is configured to forward packets to another machine, leaving the internal and local interfaces to look for an open port 80 on your router).

The simplest way is probably to use a proxy outside of your LAN.

The second simplest (and a much better than the first) solution is to add a line in your /etc/hosts file or the NetInfo equivalent in /machines/<domain name> which resolves the domain name to the internal IP address (there may be a better way to do that in X Server - i don't know).

There are other ways to solve this - but they seem overly complex for the scale of your network (2 machines). You can read up on network address translation and figure something out if you're really interested and motivated though.

I'm not sure about the mail.. is your server configured properly, and your MX properly set in the DNS entry?
/Earth\ Mk\.\ I{2}/
     
KiwiKen  (op)
Fresh-Faced Recruit
Join Date: Jun 2003
Location: New Zealand
Status: Offline
Reply With Quote
Jun 6, 2003, 06:15 PM
 
Originally posted by CatOne:
This indicates that DNS is screwed up in some way. What are you using for your DNS server? When you "navigate to it from the LAN" what are you using on the client machine for an IP?

You can try the "Network Utility" application in Applications/Utilities. There's a "lookup" tab which should show how it's getting the DNS info.

If all else fails, go to your "/etc/hosts" file (you must edit it with superuser privileges) and add a line like this

17.107.17.77 myhostname myhostname.mydomain.com

Where the IP is your IP and the hostname is of course, your hostname.

Put this on the client machine, using your static assigned IP. This file is checked before the DNS lookup, so the problem will go away.
My configuration is as follows:

ISP->DSL Modem/Ethernet Router(Set to WAN_static_ip - the one that is mapped to my URL)->Server(Unique LAN_static_ip)

I am using the ISP DNS servers currently. Performing lookup works.

The one thing that is different from what I conceptualize as "correct" is that my machine is NOT set to IP address assigned mapped to my domain name. My router has that IP...right?


KiwiKen
     
KiwiKen  (op)
Fresh-Faced Recruit
Join Date: Jun 2003
Location: New Zealand
Status: Offline
Reply With Quote
Jun 6, 2003, 09:00 PM
 
Originally posted by Earth Mk. II:
IMHO, the problem is probably with NAT on the router.

Your domain name resolves to the IP of the router. This can present some problems with packet forwarding (most likely, only the external interface is configured to forward packets to another machine, leaving the internal and local interfaces to look for an open port 80 on your router).

The simplest way is probably to use a proxy outside of your LAN.

The second simplest (and a much better than the first) solution is to add a line in your /etc/hosts file or the NetInfo equivalent in /machines/<domain name> which resolves the domain name to the internal IP address (there may be a better way to do that in X Server - i don't know).

There are other ways to solve this - but they seem overly complex for the scale of your network (2 machines). You can read up on network address translation and figure something out if you're really interested and motivated though.

I'm not sure about the mail.. is your server configured properly, and your MX properly set in the DNS entry?
I made a modification to my hosts file wherease I point mydomain.com to my local IP address of my server. This fixes the first problem.

The mail problem is a head scratcher in that I keep getting password rejections from the POP server. The log file notes an invalid password but concurs that the user indeed has an active email account.

I just installed qmail in hopes it was an AppleMail problem, but I still get the same results.

--- I will reasearch the NAT idea. Yes its a small network, but this is a testbed and learning environment for me, I want to solve it the right way.

BTW, thanks for the response....

KiwiKen
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jun 6, 2003, 10:04 PM
 
Originally posted by KiwiKen:
The mail problem is a head scratcher in that I keep getting password rejections from the POP server. The log file notes an invalid password but concurs that the user indeed has an active email account.

I just installed qmail in hopes it was an AppleMail problem, but I still get the same results.
With AppleMailServer, open Workgroup Manager and go to the Mail tab of each user. Set the "Mail Server" field to the LAN IP of the computer. If it isn't set to the LAN IP, the password will fail everytime.

Also, connecting from within the LAN, I believe you have to connect to the LAN IP as the server. Outside you can still connect to the server name (domain.com).

HTH.

[Moderators disclaimer: I know this is a OS X Server issue so it should be in the Server forum. However, half the problem isn't Server specific so I'm not sure what's appropriate. I'll leave it here since I'm thinking things are working out.]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:27 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2