"Sub-server" on external IP problem

11 posts / 0 new
Last post
#1 Mon, 01/17/2011 - 05:08
omfgbunnies

"Sub-server" on external IP problem

One of my virtual servers, let's say www.things.com, has a "sub-server" intranet.things.com.

This particular domain has Virtualmin's Name Servers listed, ns1.stuff.com and ns2.stuff.com.

Yesterday, while moving services around on a server in Things' office, I changed intranet.things.com to point to an "external IP" address.

This morning I noticed that not only intranet.things.com has changed, but also www.things.com and all other variations.

While I've changed it back to the main shared IP so that hopefully the site will begin to work again, I'd like to know if anyone knows the reason this is happening, and a potential way of sorting it out so it actually does what the hell its supposed to...? :)

Mon, 01/17/2011 - 09:34
Locutus

Sorry, I can't really follow you there.. Can you re-iterate what exactly your setup is and what exactly you changed from what to what?

Sat, 01/22/2011 - 09:14
omfgbunnies

Sorry.

Base setup for the virtual server in question:

Virtual Server details:
- Domain Name: things.com
- Administration Username: things
- Administration Group: things
- Home directory: /home/things
Configurable settings:
- Mailbox name prefix: things (used by 94 users)
- Server configuration template: default settings
- Account plan: Default plan
- Description: Migrated cPanel server things.com
IP addresses and interfaces:
- IP address: 000.000.000.000 (shared by all servers)
- Virtual interface: none
- External IP: Same as real address (000.000.000.000)
Quotas and limits:
- Unlimited checked for all options
Enabled features:
- Mail
- Apache
- MySQL
- Webmin
- DNS
- Mailman

What I was attempting to do was to change intranet.things.com, an existing sub-domain to an external IP address. The current setup of that sub-domain is (mostly only shown where different to above):

- Domain name: intranet.things.com
- Home directory: /home/things/domains/intranet.things.com
- Parent virtual server: things.com
Configurable settings:
- Description: migrated cPanel sub-domain
IP addresses and interfaces:
- IP address: 000.000.000.000 (Shared by all servers)
- Virtual interface: none
- External IP address: Same as real address (000.000.000.000)
Enabled features:
- DNS
- Apache

To change that to an external IP, I was putting another IP in the "external IP address" field, and clicking "save virtual server", as shown here:

- Domain name: intranet.things.com
- Home directory: /home/things/domains/intranet.things.com
- Parent virtual server: things.com
Configurable settings:
- Description: migrated cPanel sub-domain
IP addresses and interfaces:
- IP address: 000.000.000.000 (Shared by all servers)
- Virtual interface: none
- External IP address: 100.000.000.001 *changed to external IP
Enabled features:
- DNS
- Apache

However, this didn't seem to work correctly - as it changed everything under "things.com", from the main site (www.things.com) to the subdomains, to all point to this external IP which was assigned only to "intranet.things.com".

Obviously this was just a test. We'd like to use a different subdomain to point to the external IP address when it's figured out (vpn.things.com). I was wondering if this issue was maybe something to do with the previous import from cPanel a few years back - thus could the problem be resolved by just deleting "intranet.things.com" and setting up "vpn.things.com" as a new subdomain with external IP? Should I maybe create "vpn.things.com" as a new top level virtual server along side "things.com", with an external IP, to ensure that the settings for "things.com" aren't screwed up again?

(Client gets a bit uppity when the email and website stops working!)

Thanks :)

Sun, 01/23/2011 - 10:54
Locutus

Do I understand that correctly: you changed the "External IP address" of a sub-server, and it changed the parent server and all other sub-servers as well? That definitely should not happen, and does not happen when I test it here...

Where do you see the change? Did the DNS entries get changed? The Apache config? The "External IP address" option is only intended to be used when the server is reached via a NAT router, and it should only affect the nameserver entries for the given sub-server.

Sun, 01/23/2011 - 11:19
omfgbunnies

Yes. Everything changed for the domain. I wasn't the one who noticed the change - the client did: while at home they went to their company website (www.) and were greeted with the subdomain I'd created. Because of this I immediately changed it back, and thanked the powers that be that it was a weekend - I just didn't have time to check anything out first, it had to be back as it was for as near to 9am Monday as possible.

I suppose a change of settings and a change back would possibly be done fast enough to not propogate a problematic change through DNS for too long - or would it?

Sun, 01/23/2011 - 14:08
Locutus

You didn't answer all my questions. :) "Where exactly do you see the change? Did the DNS entries get changed? The Apache config?"

Two websites being served from the same data does not necessarily mean IP address problem.

Is your server actually connected via a NAT router?

Sun, 01/23/2011 - 15:34
omfgbunnies

Sorry for not being clearer. I didn't notice the change in any server configs - I noticed it when navigating to the website from home (a day after making the change). Thus, the DNS config had changed. I had to change it back immediately on Virtualmin, and didn't check the Apache/BIND config to see what'd messed up directly in there - but all the sites for that domain, be it www. or subdomains, were altered to the external IP.

My server is not connected via NAT. It is a dedicated server with OVH.co.uk.

What I was attempting was to target the subdomain (only!) to a separate IP address - and this server is on the client's network, but showing externally with a static IP (in a DMZ).

Sun, 01/23/2011 - 16:19
Locutus

Hmm... sorry, I still don't fully get what your network setup is. :) Your last line implies that the subdomain is hosted on a different machine than the main domain? Or did you mean with "this server" the machine where all those domains are on?

What exactly is the "client's network"? Is that something else than the network where your server in question is? And how is the DMZ set up? Is the IP of the subdomain externally reachable? Is it an address that is assigned to a network interface of the server? If so, the place where you changed the address is not the right place, but you'd want to use Server Configuration -> Change IP Address to assign a different address to the server.

Sun, 01/23/2011 - 16:27
omfgbunnies

I have my server, which hosts the client's website. It's on a dedicated server in a datacentre.

The client have another server, at their office, sitting on a DMZ with a dedicated IP. The DMZ is completely open, pingable reachable by everything.

This IP, the client's one, is the one I want to point intranet.theirdomain.com to, whereas currently it's just pointed to my dedicated server's IP.

I cannot use "Server Configuration -> Change IP Address", as this IP address resides on a different server (in a different country).

...hence my assumption "external IP" was the right place to be doing this.

Sun, 01/23/2011 - 18:10
Locutus

In that case, my suggestion would be to not manage that sub-domain through Virtualmin at all, but just create the appropriate zone in the Webmin BIND module... I suppose that will produce the least conflicts... My assumption is that it's not really meant to be used this way, as in hosting a parent domain on the Virtualmin server, and a subdomain completely elsewhere.

Neither the "Change IP Address" nor the "External IP" are meant to be used in this way indeed. Both are used when the IP is actually one of the Virtualmin server. "External IP" does not mean that the IP address of the site you wish to define is "external" as in "located completely elsewhere"; it refers to an IP address of your system that is externally reachable, as in from the outside.

Sun, 01/23/2011 - 18:10
omfgbunnies

Ah right.

I'll try the alternative with Webmin's BIND module then.

Thanks for your input!