Welcome, Guest
Please Login or Register.
Lost Password?
Multi-Domains on Home Web Server - DNS issues? (1 viewing)
Post Reply

TOPIC: Multi-Domains on Home Web Server - DNS issues?

#15777
RainbowViper (User)
Posts: 30
graphgraph
Multi-Domains on Home Web Server - DNS issues? 2008/08/20 14:38  
I've searched til I'm blue in the face, no luck with my specific problem.

Scenario:

Home Lan: Gagabit unmanaged switch, into which is plugged my Webserver, a couple NAS devices, a Laptop, Network printer, and Actiontec 701 DSL Modem/Router.

To avoid setting up a million Port Forwards, I put the webserver (192.168.1.200) in the DMZ zone for the Actiontec.

LAN subnet is: 192.168.1.x (currently using x=100-102 for devices, x=200-205 for webserver)

Default Gateway for all LAN devices, including webserver, is 192.168.1.1 and the webserver is using my IPS's DNS servers as "Preferred" and "Alternate" DNS Server.

WAN IP on the Actiontec is my Dedicated IP Number.

I have only ONE dedicated IP number, but that shouldn't be a problem.
I have changed my "real" Dedicated IP number in what follows, for security, to 12.34.56.78

At my registrar, I have private nameservers set to:

ns1.mydomain.us 12.34.56.78
ns2.mydomain.us 12.34.56.78

Both have been setup for a week.

All three Domains are using the private nameservers. I had to do it this way since Moniker won't accept a "single" NS pointer, it requires 2. (But I can define the private nameservers to use the same IP. Go figure.)


(My desktop PC is normally plugged into the LAN, as well, but for my tests it's using my other Internet service, isolated on a Comcast Cable Modem. Seperate ISP.)

I have 3 domains I want to host on the webserver (running CentOS 5.2):
mydomain.us, mydomain.org, and mydomain.net

I manually setup mydomain.us before installing VirtualMin.

DNS (CHROOOTED BIND9) *is* working, since I am able to use my desktop to go to http://www.mydomain.us (and see the webpage I setup in /usr/var/html/index.html), as well as access it for FTP (via ftp.mydomain.us) and SSH (via www.mydomain.us).


Contents of that DNS Zone file as follows.
**********************************************************

Code:

$ttl 38400 mydomain.us.    IN    SOA    ns1.mydomain.us. admin.mydomain.us. (             1219107588             10800             3600             604800             38400 ) mydomain.us.    IN    NS    ns1.mydomain.us. mydomain.us.    IN    NS    ns2.mydomain.us. mydomain.us.    IN    A    12.34.56.78 localhost    IN    A    127.0.0.1 mydomain.us.    IN    MX    5 mydomain.us. www         IN    CNAME    mydomain.us. mail        IN    CNAME    mydomain.us. ns1.mydomain.us.    IN    A    12.34.56.78 ns2.mydomain.us.    IN    A    12.34.56.78 ftp.mydomain.us.    IN    A    12.34.56.78



********************************************************

The above Domain resolves just fine.

I then setup virtual IP's for use with virtual NICS:

(NOTE: SERVER NIC eth0 is set to 192.168.1.200)

eth0:1 set to 192.168.1.201
eth0:2 set to 192.168.1.202
eth0:3 set to 192.168.1.203
eth0:4 set to 192.168.1.204
eth0:5 set to 192.168.1.205

My problem is that the other two domains (mydomain.net and .org) simply won't resolve. They time out.

I *THINK* I've set them up in Virtualmin as I should, but am not sure. I am still VERY new at this. But they both have Virtual Server entries in Apache, and Zones in BIND DNS. Here's one of them, adjusted for security:
*********************************************************


Code:

$ttl 38400 @    IN    SOA    ns1.mydomain.us. admin.mydomain.org. (             1219266602             10800             3600             604800             38400 ) @    IN    NS    ns1.mydomain.us. mydomain.org.    IN    A    192.168.1.202 www.mydomain.org.    IN    A    192.168.1.202 ftp.mydomain.org.    IN    A    192.168.1.202 m.mydomain.org.     IN    A    192.168.1.202 localhost.mydomain.org.    IN    A    127.0.0.1 webmail.mydomain.org.    IN    A    192.168.1.202 admin.mydomainr.org.    IN    A    192.168.1.202 mail.mydomain.org.    IN    A    192.168.1.202 mydomain.org.       IN    MX    5 mail.mydomain.org. mydomain.org.    IN    TXT    "v=spf1 a mx a:mydomain.org ip4:192.168.1.200 ip4:192.168.1.202 ?all"



************************************************

When I tried to manually set up the ORG and NET domains, without using VirtualMin, try as I might I couldn't get them to point to seperate directories. They would only resolve to the same directory as the US extension (usr/var/www/html/index.html).

I admit I'm a noob, but this shouldn't be THAT hard. What in the world am I doing wrong?

Thanks in advance.


Post edited by: RainbowViper, at: 2008/08/20 16:25
  The administrator has disabled public write access.
#15788
rawww (User)
Posts: 69
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/20 22:51  
As I don't understand your problem from your description I will only quess what you can do for finding more about problem.

Which machine resolves right IP address. Is box on which you have installed virtualmin able to resolve domains you have setuped?

Log in virtualmin machine and type:

host mydomain.org
host mydomain.com

etc.

If you will receive IP address problem is somwhere else.

It may be in BIND settings.

Can you resolve any IP addres from your laptop for example?
Try:

dig mydomain.org $virtualminserverIP

You can find more.

But if I imagine this - you have LAN and switch connected to router from which you gets WAN connection. So you only have one IP address.
Does your modem forward all traffic to your virtualmin server? I mean DNS (port 53) and all other stuff like POP3 HTTP etc.?

I would be happy if I can help you more - so if you will not be able to find problem and solve it, please write more about it and I will try to help you out.
  The administrator has disabled public write access.
#15792
RainbowViper (User)
Posts: 30
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 07:11  
Thank you, rawww.

I've done some more experimenting, and my setup above is no longer completely accurate.

But first, host mydomain.xxx returns the same info for all three domains:

[root@server named]# host mydomain.us
mydomain.us has address 12.34.56.78

[root@server named]# host mydomain.org
mydomain.org has address 12.34.56.78

[root@server named]# host mydomain.net
mydomain.net has address 12.34.56.78

12.34.56.78 is my Dedicated IP Number.

And the results of DIG, with mydomain.us substituted for my real Domain's .us name, and 12.34.56.78 substituted for my real Dedicated IP Number:

Code:

<span style="color: #008000"> [root@server named]# dig mydomain.us $12.34.56.78 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4129 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;mydomain.us.               IN      A ;; ANSWER SECTION: mydomain.us.        38400   IN      A       12.34.56.78 ;; AUTHORITY SECTION: mydomain.us.        38400   IN      NS      ns2.mydomain.us. mydomain.us.        38400   IN      NS      ns1.mydomain.us. ;; ADDITIONAL SECTION: ns1.mydomain.us.    38400   IN      A       12.34.56.78 ns2.mydomain.us.    38400   IN      A       12.34.56.78 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:30:22 2008 ;; MSG SIZE  rcvd: 117 ; <<>> DiG 9.3.4-P1 <<>> mydomain.us 16.17.47.104 ;; global options:  printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40194 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0 ;; QUESTION SECTION: ;16.17.47.104.                  IN      A ;; AUTHORITY SECTION: .                       518400  IN      NS      C.ROOT-SERVERS.NET. .                       518400  IN      NS      D.ROOT-SERVERS.NET. .                       518400  IN      NS      E.ROOT-SERVERS.NET. .                       518400  IN      NS      F.ROOT-SERVERS.NET. .                       518400  IN      NS      G.ROOT-SERVERS.NET. .                       518400  IN      NS      H.ROOT-SERVERS.NET. .                       518400  IN      NS      I.ROOT-SERVERS.NET. .                       518400  IN      NS      J.ROOT-SERVERS.NET. .                       518400  IN      NS      K.ROOT-SERVERS.NET. .                       518400  IN      NS      L.ROOT-SERVERS.NET. .                       518400  IN      NS      M.ROOT-SERVERS.NET. .                       518400  IN      NS      A.ROOT-SERVERS.NET. .                       518400  IN      NS      B.ROOT-SERVERS.NET. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:30:22 2008 ;; MSG SIZE  rcvd: 241 </span>



And here's DIG for mydomain.net (.org produced same result, adjusted for domain name)

Code:

<span style="color: #008000"> [root@server named]# dig mydomain.net $12.34.56.78 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65293 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;mydomain.net.              IN      A ;; ANSWER SECTION: mydomain.net.       38400   IN      A       12.34.56.78 ;; AUTHORITY SECTION: mydomain.net.       38400   IN      NS      ns1.mydomain.us. mydomain.net.       38400   IN      NS      ns2.mydomain.us. ;; ADDITIONAL SECTION: ns1.mydomain.us.    38400   IN      A       12.34.56.78 ns2.mydomain.us.    38400   IN      A       12.34.56.78 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:39:13 2008 ;; MSG SIZE  rcvd: 133 ; <<>> DiG 9.3.4-P1 <<>> mydomain.net 16.17.47.104 ;; global options:  printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21417 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0 ;; QUESTION SECTION: ;16.17.47.104.                  IN      A ;; AUTHORITY SECTION: .                       518400  IN      NS      L.ROOT-SERVERS.NET. .                       518400  IN      NS      M.ROOT-SERVERS.NET. .                       518400  IN      NS      A.ROOT-SERVERS.NET. .                       518400  IN      NS      B.ROOT-SERVERS.NET. .                       518400  IN      NS      C.ROOT-SERVERS.NET. .                       518400  IN      NS      D.ROOT-SERVERS.NET. .                       518400  IN      NS      E.ROOT-SERVERS.NET. .                       518400  IN      NS      F.ROOT-SERVERS.NET. .                       518400  IN      NS      G.ROOT-SERVERS.NET. .                       518400  IN      NS      H.ROOT-SERVERS.NET. .                       518400  IN      NS      I.ROOT-SERVERS.NET. .                       518400  IN      NS      J.ROOT-SERVERS.NET. .                       518400  IN      NS      K.ROOT-SERVERS.NET. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:39:13 2008 ;; MSG SIZE  rcvd: 241 </span>



Since I want to tackle one problem at a time, let's pretend that the only devices on my LAN are the webserver and my printer.

From my Desktop, attached to my Cable Modem and NOT on the LAN. all three domains resolve as of this morning, but they are ALL resolving to the webpages in /var/www/html (at this point, that's better than I was doing yesterday) even though I have a virtual server defined for the .us Domain. I will wait to define Virtual Servers for the .org and .net extensions until I get the .us extension resolving to the right directory. Once I get that working, I'm certain I can get the other two to work.

I'm also certain that I have something misconfigured in that .us virtual server, however, or it WOULD point to /home/(username)/public_html. And maybe solving that ONE problem will let me correctly define the other two I'll need?

Yes, the server is plugged into the switch, and the switch plugged into the router/modem. I have only one dedicated IP number: 12.34.56.78, on the WAN side of the router. The internal network is 192.168.1.x. The server NIC is set to 192.168.1.200, with default gateway 192.168.1.1, and primary/secondary DNS set to my DSL provider's main DNS servers at 12.34.x.x

For now, THE SERVER IS IN THE DMZ for the Router, so no port forwarding is necessary. Every request from the WAN side gets to the server, except for port 9100 which I have defined to forward to my printer on 192.168.1.102. (Printing from the webserver works fine, as does printing from my laptop, so I'm pretty THAT part is set right.)



So, right as I write this......

I have 3 Master Zones defined in BIND. The .us Zone is identical to the first code box in my original post above.

The .net and .org are identical to the .us Zone (adjusted for Domain Name), but do NOT contain the two A records that start with ns1. and ns2.mydomain.us.

NOTE: When I first setup the server, I named it server.mydomain.us and this is the name it wants to use in the very first A record following the SOA. I simply change the "server" to "ns1" throughout the Zone Record, and it works fine.

There's some "connection" between the DNS Zone Records and the Virtual Server(s) that I'm just NOT understanding. Until I get this straight, I'm not using Virtualmin but rather am using Webmin so I can see the records simply and directly. The Mail Servers that will need to be setup are something I will tackle later, too. But for now, I just want to get all three domains resolving and pointing to their "correct" directories under /home/(username)/public_html.

And thanks again for your help so far. I appreciate it.
  The administrator has disabled public write access.
#15793
RainbowViper (User)
Posts: 30
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 07:11  
Thank you, rawww.

I've done some more experimenting, and my setup above is no longer completely accurate.

But first, host mydomain.xxx returns the same info for all three domains:

[root@server named]# host mydomain.us
mydomain.us has address 12.34.56.78

[root@server named]# host mydomain.org
mydomain.org has address 12.34.56.78

[root@server named]# host mydomain.net
mydomain.net has address 12.34.56.78

12.34.56.78 is my Dedicated IP Number.

And the results of DIG, with mydomain.us substituted for my real Domain's .us name, and 12.34.56.78 substituted for my real Dedicated IP Number:

Code:

<span style="color: #008000"> [root@server named]# dig mydomain.us $12.34.56.78 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4129 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;mydomain.us.               IN      A ;; ANSWER SECTION: mydomain.us.        38400   IN      A       12.34.56.78 ;; AUTHORITY SECTION: mydomain.us.        38400   IN      NS      ns2.mydomain.us. mydomain.us.        38400   IN      NS      ns1.mydomain.us. ;; ADDITIONAL SECTION: ns1.mydomain.us.    38400   IN      A       12.34.56.78 ns2.mydomain.us.    38400   IN      A       12.34.56.78 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:30:22 2008 ;; MSG SIZE  rcvd: 117 ; <<>> DiG 9.3.4-P1 <<>> mydomain.us 16.17.47.104 ;; global options:  printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40194 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0 ;; QUESTION SECTION: ;16.17.47.104.                  IN      A ;; AUTHORITY SECTION: .                       518400  IN      NS      C.ROOT-SERVERS.NET. .                       518400  IN      NS      D.ROOT-SERVERS.NET. .                       518400  IN      NS      E.ROOT-SERVERS.NET. .                       518400  IN      NS      F.ROOT-SERVERS.NET. .                       518400  IN      NS      G.ROOT-SERVERS.NET. .                       518400  IN      NS      H.ROOT-SERVERS.NET. .                       518400  IN      NS      I.ROOT-SERVERS.NET. .                       518400  IN      NS      J.ROOT-SERVERS.NET. .                       518400  IN      NS      K.ROOT-SERVERS.NET. .                       518400  IN      NS      L.ROOT-SERVERS.NET. .                       518400  IN      NS      M.ROOT-SERVERS.NET. .                       518400  IN      NS      A.ROOT-SERVERS.NET. .                       518400  IN      NS      B.ROOT-SERVERS.NET. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:30:22 2008 ;; MSG SIZE  rcvd: 241 </span>



And here's DIG for mydomain.net (.org produced same result, adjusted for domain name)

Code:

<span style="color: #008000"> [root@server named]# dig mydomain.net $12.34.56.78 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65293 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;mydomain.net.              IN      A ;; ANSWER SECTION: mydomain.net.       38400   IN      A       12.34.56.78 ;; AUTHORITY SECTION: mydomain.net.       38400   IN      NS      ns1.mydomain.us. mydomain.net.       38400   IN      NS      ns2.mydomain.us. ;; ADDITIONAL SECTION: ns1.mydomain.us.    38400   IN      A       12.34.56.78 ns2.mydomain.us.    38400   IN      A       12.34.56.78 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:39:13 2008 ;; MSG SIZE  rcvd: 133 ; <<>> DiG 9.3.4-P1 <<>> mydomain.net 16.17.47.104 ;; global options:  printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21417 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0 ;; QUESTION SECTION: ;16.17.47.104.                  IN      A ;; AUTHORITY SECTION: .                       518400  IN      NS      L.ROOT-SERVERS.NET. .                       518400  IN      NS      M.ROOT-SERVERS.NET. .                       518400  IN      NS      A.ROOT-SERVERS.NET. .                       518400  IN      NS      B.ROOT-SERVERS.NET. .                       518400  IN      NS      C.ROOT-SERVERS.NET. .                       518400  IN      NS      D.ROOT-SERVERS.NET. .                       518400  IN      NS      E.ROOT-SERVERS.NET. .                       518400  IN      NS      F.ROOT-SERVERS.NET. .                       518400  IN      NS      G.ROOT-SERVERS.NET. .                       518400  IN      NS      H.ROOT-SERVERS.NET. .                       518400  IN      NS      I.ROOT-SERVERS.NET. .                       518400  IN      NS      J.ROOT-SERVERS.NET. .                       518400  IN      NS      K.ROOT-SERVERS.NET. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Aug 21 10:39:13 2008 ;; MSG SIZE  rcvd: 241 </span>



Since I want to tackle one problem at a time, let's pretend that the only devices on my LAN are the webserver and my printer.

From my Desktop, attached to my Cable Modem and NOT on the LAN. all three domains resolve as of this morning, but they are ALL resolving to the webpages in /var/www/html (at this point, that's better than I was doing yesterday) even though I have a virtual server defined for the .us Domain. I will wait to define Virtual Servers for the .org and .net extensions until I get the .us extension resolving to the right directory. Once I get that working, I'm certain I can get the other two to work.

I'm also certain that I have something misconfigured in that .us virtual server, however, or it WOULD point to /home/(username)/public_html. And maybe solving that ONE problem will let me correctly define the other two I'll need?

Yes, the server is plugged into the switch, and the switch plugged into the router/modem. I have only one dedicated IP number: 12.34.56.78, on the WAN side of the router. The internal network is 192.168.1.x. The server NIC is set to 192.168.1.200, with default gateway 192.168.1.1, and primary/secondary DNS set to my DSL provider's main DNS servers at 12.34.x.x

For now, THE SERVER IS IN THE DMZ for the Router, so no port forwarding is necessary. Every request from the WAN side gets to the server, except for port 9100 which I have defined to forward to my printer on 192.168.1.102. (Printing from the webserver works fine, as does printing from my laptop, so I'm pretty THAT part is set right.)



So, right as I write this......

I have 3 Master Zones defined in BIND. The .us Zone is identical to the first code box in my original post above.

The .net and .org are identical to the .us Zone (adjusted for Domain Name), but do NOT contain the two A records that start with ns1. and ns2.mydomain.us.

NOTE: When I first setup the server, I named it server.mydomain.us and this is the name it wants to use in the very first A record following the SOA. I simply change the "server" to "ns1" throughout the Zone Record, and it works fine.

There's some "connection" between the DNS Zone Records and the Virtual Server(s) that I'm just NOT understanding. Until I get this straight, I'm not using Virtualmin but rather am using Webmin so I can see the records simply and directly. The Mail Servers that will need to be setup are something I will tackle later, too. But for now, I just want to get all three domains resolving and pointing to their "correct" directories under /home/(username)/public_html.

And thanks again for your help so far. I appreciate it.
  The administrator has disabled public write access.
#15794
RainbowViper (User)
Posts: 30
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 07:13  
Sorry, I DO NOT understand why I'm double-posting. I am definitely pushing submit only ONCE.
  The administrator has disabled public write access.
#15795
RainbowViper (User)
Posts: 30
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 07:18  
Also note that the code box for mydomain.net has an error in it that *I* made.

Anywhere it says 16.17.47.104 that should be 12.34.56.78 and I'd appreciate it if you'd edit it to mask off that IP number. It's too close to my real number for comfort. Thank you.
  The administrator has disabled public write access.
#15796
RainbowViper (User)
Posts: 30
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 07:28  
Also, I don't know if this helps, but at the bottom of my /etc/httpd/conf/httpd.conf file is this entry for the Virtual Server I manually created:

Code:

<VirtualHost 12.34.56.78> DocumentRoot /home/(xxxx)/public_html ServerName mydomain.us <Directory "/home/(xxxx)/public_html"> allow from all Options Indexes </Directory> HostNameLookups on UseCanonicalName off Options Indexes </VirtualHost>



(xxxx) is the actual username for the directory.
  The administrator has disabled public write access.
#15797
ronald (User)
Posts: 505
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 12:36  
under webmin-network configuration
you need the eth0 to point to your hostname, i.e. "server.mydomain.us"
then you need to create 2 virtual interfaces on the eth0, i.e.
eth0:1 (for the ns1 IP)
eth0:2 (for the ns2 IP) even if they're all the same IP's
and check the "Host Addresses" add the hostname and both ns records.

then in virtualmin-system settings-module config you need to add your wan as in one of your zones the internal IP is visible which is incorrect. "Default IP address for DNS records"

Apache will have the internal IP to run on but the zone files need the external IP. I wouldn't use chname btw but just the IP.

in the BIND module you can set the nameserver to what you want it to be.
Click on zone defaults and under "Default nameserver for master domains" use the ns1.domain.us

For the 3 domains you want to host, they'll need to be created by virtualmin so they will be under the /home directory.

when all settings above are correct you could even delete the domains and recreate them new.
  The administrator has disabled public write access.
#15798
ronald (User)
Posts: 505
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 12:37  
also <VirtualHost 12.34.56.78> would normally be <VirtualHost 12.34.56.78:80>
as you tell Apache what port to listen to
  The administrator has disabled public write access.
#15799
RainbowViper (User)
Posts: 30
graphgraph
Re:Multi-Domains on Home Web Server - DNS issues? 2008/08/21 17:05  
Thank you for the help, Ronald, I appreciate it.

I've printed out your replies and will try to make sense of what you suggest.

Note: my FIRST post is incorrect. Ignore all Zone Records contained within it. I've changed things.

My FOLLOWING posts, after rawww's answer, have the correct info, and none of them have the Internal IP number showing, as you thought.

Keep in mind that, until I get the basics straight, I'm only using Webmin to make any changes, and not Virtualmin. Once it's running correctly WITHOUT Virtualmin, I'll start using that. And maybe this whole post belongs in the Webmin section, but I *did* start by trying to use Virtualmin and will want to do so once it's working right. I'll leave that up to the Moderators.

Anyway, I'm already confused by your first instruction to change the ETHx IP's (including eth0 ??) to the External IP number (ns1 and ns2), though, since the webserver still sits *ON* the Internal LAN. (eth0 *does* point to server.mydomain.us already.)

Perhaps I'm completely misunderstanding what you mean, though?

Even though I put it into the DMZ, it's still using the LAN subnet (192.168.1.200) and communicates to the "outside world" ONLY via the Default Gateway (192.168.1.1). It also communicates to my printer via 192.168.1.102:9100, and if I change it then that wouldn't work either.

Let me give you my exact setup as it sits now.

For eth0:
Webmin -> Network Configuration -> Network Interfaces -> eth0 ->
IP Address: 192.168.1.200
Netmask: 255.255.255.0
Broadcast: 192.168.1.255
(MTU, Status, MAC Address): irrelevant

(If I set 192.168.1.200 to 12.34.56.78 (my dedi IP) I don't see how that could possibly still work.)

Webmin -> Network Configuration -> Hostname And DNS Client ->
Hostname: server.mydomain.us
Resolution Order: Hosts DNS
DNS Servers: 127.0.0.1 , 12.34.xx.xx , 12.34.xx.x(x+1) <- my ISP's DNS Servers
Search Domains: mydomain.us

Note also, that all my NS's are the *same* IP number, since I only have one to begin with (12.34.56.78)

When you say:
eth0:1 (for the ns1 IP)
eth0:2 (for the ns2 IP)

Does that means set them to the *external* IP?
(ns1 and ns2 are set at my registrar, and in my Zones, to point to my single dedicated IP.) If I do, won't I have the same problem as I would if I change eth0 to the external IP? I can't see how that would work since, again, the webserver is sitting on the 192.168.1.x subnet.

At the moment, all three Domains *DO* resolve to my webserver, but even though I setup one Virtual Server (mydomain.us) in Apache to use /home/(username)/public_html it still insists on going to /var/www/html to retrieve the pages.

And the other two do as well, but that makes sense since there's no Virtual Server entries for them yet, and they are defaulting to the Default Virtual Server which is defined to /var/www/html.

Sorry if these are such noob questions. I've been a network engineer for many years, but exclusively on LAN's where we only had one subnet. And from what I learned all devices on a LAN, real or Virtual, must use the same subnet, and "leave" the subnet only via a Gateway (or a Bridge).

Thanks in adnvance.
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.