PDA

View Full Version : Problems with the 2 IPs (Linux)


Teej
10-28-2006, 09:30 PM
Prior to ordering the VPS service last week I had a live chat session with a sales agent where I asked how many IP addresses came as standard with the VPS service, and if I could order additional IPs. I explained that I wanted to host multiple HTTPS domains each of which needed access to port 443 on an exclusive IP address.

The agent told me:
The VPS package comes with 2 IPs you can use for your purposes but you cannot order additional IPs.

Whilst creating the first three domains using Plesk I've come across a series of issues that affect web-hosting and DNS. From my investigations so far they look likely to affect other services too.

The problems all seem to be related to a mis-configured IP address. After a long explanation of my experience in this article, my question is:

Whats going on with the IPs?

When I logged in to Plesk after the VPS was created the first thing I did was check the IP addresses because I needed to plan how to allocate the services I want to host.

On my VPS, Plesk shows 2 IPs that I'll refer to here by their final octets: they are .160 and .168.

I saw an alert exclamation next to the first IP (.160) but couldn't seem to change it so assumed that was to be expected as the VPS was new - I'd not changed anything at that point.
http://www.tjworld.net/media/Plesk-Server-IPAddress.jpg
I tried ICMP ping and http and both IPs replied and served pages so I assumed this was a Plesk issue only.

I knew I needed to share IPs amongst hosted domains so set them both to Shared. I put the alert-icon to the back of my mind and moved on to exploring the system and preparing to set up hosted services.

I created 3 new domains and selected the first IP address in the drop-down list (.160) for each.
http://www.tjworld.net/media/Plesk-Domains-Domain-Setup-IPAddress.jpg

When I visited the web site for the new domains I saw a Plesk-generated page and assumed at that point everything was okay
http://www.tjworld.net/media/Plesk-DefaultPage.jpg
(Later I discovered that page was not the correct one to expect)

I then spent some time installing and configuring MySQL 5 to run alongside MySql 4.1 that Plesk uses and requires.
Next I used wget to download a series of open-source PHP applications such as WordPress, Gallery2, phpBB and also a backup of a MySQL database that currently serves one of the domains about to be hosted on the VPS.

I began configuring the PHP applications by altering their various config files to point to the localhost MySQL database. At this point I was ready to run the various PHP installers.

This is when I discovered that all PHP scripts were generating 404 Not Found errors.

Initially I thought this was caused by a misconfiguration of PHP for the vhosts because when I put a simple script in /var/www/vhosts/default/htdocs/info.php and accessed it using the hostname I'd allocated to my VPS's IP (.168 as given in the Welcome email) it worked as expected.
<?php phpinfo(); ?>
The same script in the root of any of the vhosts failed with the 404 error.

I then discovered a couple of issues:

Firstly, despite altering the default HTML page for each of the domains (var/www/vhosts/<domain>/httpdocs/index.html) the default page shown was the Plesk "this domain has no hosting" page rather than the Domain-Default page.

Secondly, after setting up a secondary DNS zone at another location, adding its sub-net to the Common ACL I couldn't get the zone transfers from the named on the VPS to work.

After a lot of investigation over the past 24 hours it seems the root cause is the assignment of the 2 IP addresses available via the Plesk control panel, and the services the IPs bind to.

I noticed in /var/log/messages that named was not binding to the .160 IP that the domains are allocated by Plesk. named only binds to .168
named[7211]: starting BIND 9.3.1 -u named -c /etc/named.conf -u named -t /var/named/run-root
named[7211]: found 8 CPUs, using 8 worker threads
named[7211]: loading configuration from '/etc/named.conf'
named[7211]: no IPv6 interfaces found
named[7211]: listening on IPv4 interface lo, 127.0.0.1#53
named[7211]: listening on IPv4 interface venet0:0, x.y.z.168#53
named[7211]: command channel listening on 127.0.0.1#953
named[7211]: zone 0.0.127.IN-ADDR.ARPA/IN: loaded serial 20010622
As soon as I changed the DNS master zone server IP to .168 on the secondary, the zone transfer completed.

/sbin/ifconfig reveals that .160 isn't assigned to any interface and checking /etc/sysconfig/network-scripts shows there is no ifcfg-venet* for the .160 address.

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:981180 errors:0 dropped:0 overruns:0 frame:0
TX packets:981180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:168993520 (161.1 MiB) TX bytes:168993520 (161.1 MiB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:7598 errors:0 dropped:0 overruns:0 frame:0
TX packets:7612 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:847912 (828.0 KiB) TX bytes:1897681 (1.8 MiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:x.y.z.168 P-t-P:x.y.z.168 Bcast:x.y.z.168 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

I changed the IP used by one of the hosted domains to .168 and discovered the domain default-page changed to
http://www.tjworld.net/media/Domain-DefaultPage.jpg
and the info.php now worked!

So (finally!) the question is, whats going on with the IPs?

emanuel
11-24-2006, 07:54 PM
Gate's support page says that each VPS has only 1 IP address and customers can purchase more as they need. Here's the URL: http://216.219.248.52/display/2/kb/article.asp?aid=71814

So the operator who told you that is completely nuts or support pages are crap.

The questions remains:

1 or 2 IPs? Can or cannot purchase more IPs? What's the cost? Gate.com staff, are you reading?

By the way, I hate this habit that Affinity companies have, which is to try to mislead the customer by hiding essential information about the service. Do they think we're stupid?

For instance, they simply don't mention the network speed (10 or 100Mbps?) or the number of IPs included with VPS. They do the very same thing with dedicated servers...

So you have to ask their sales representative for the missing information and take his word which, as we just saw, is far from reliable.

At the end, you've got nothing wrote, so you have no guarantees as well. If you should complain later, how will you prove what you're saying?

What kind of company is Affinity? This question goes for their CEO or whoever established this infamous customer policy. Shame on you.

Teej
11-27-2006, 01:52 PM
The URL to the Support page you give doesn't work.

It turns out you can't simply copy a URL from a link within the support pages. The solution is to go to the article and then click the Bookmark link on the right which will pop-up a window with the text of the link.

In this case the correct link is http://216.219.248.52/article.asp?article=71814&p=3987 and at this time says:
How many IPs are provided?

NOTE: This article only applies to Virtual Private Server accounts.

One IP comes with the VPS initially, but you can purchase additional blocks of IPs by contacting Customer Care.