IP Address Management. How to Make it Simpler With Plesk

IP Address Management In Plesk

Plesk’s user-friendly and extensively featured GUI was created to make the management of web, mail, DNS, and other services a lot simpler for IT specialists. It’s is a hosting control panel, so its job is to act as a bridge between a system’s services and its users. For instance, when someone uses the GUI to create a website, Plesk broadcasts this request to either an Apache or an IIS web server, and in the case of the latter it adds a new virtual host to the system. Having a one-stop-shop like this for looking after system services means that maintenance costs go down and flexibility and control for administrators go up.

One of the things that the Plesk GUI lets you do is both manage and add to the list of registered IP addresses.

The designation for every IP address registered in Plesk must the either shared or dedicated. As the name suggest, shared IP addresses can be shared between an endless number of different websites irrespective of which account they belong to. Dedicated IP addresses are tied to one account only, be they for the customer, reseller, or a Plesk administrator. You can use them for hosting numerous websites, but they must always belong to the same account.

An IP address with the dedicated designation offers these benefits:

  • hosting anonymous FTP shares (no password authentication required).
  • reputation management for an IP address—perhaps because the previous subscriber on that account was distributing spam, for instance—so that websites hosted on it aren’t tarred with the same brush.
  • use an SSL/TLS certificate to secure a website if Server Name Indication (SNI) support is not available. SNI opens the door for SSL/TLS protection for websites that share IP addresses. This may not work with every browser and server though. To find out more, see SSL/TLS and Shared IP Addresses.

How to list registered IP addresses

To look at the list of IP addresses registered in Plesk together with essential information like the number of websites or the IP address type hosted on a given IP address, go to Tools & Settings > IP Addresses. The search menu lets you search for IP addresses. You can bring it up by clicking on the arrow button on the right-hand side of the screen.

How To Add IP Addresses In Plesk

1. Go to Tools & Settings > IP Addresses.

2. Click on Add IP Address.

If you are running Plesk within a Virtuozzo container, you can only add IP addresses on the Virtuozzo hardware node. The Add IP Address button won’t be shown. Have a look at the documentation for Virtuozzo if you want to learn how to add IP addresses when running Plesk in a Virtuozzo container. Once you’ve added all the IP addresses you want, you’ll need to re-read IP addresses.

You can’t add or remove IP addresses from a network interface that has DHCP enabled. If that’s the case, you’ll need to disable it for a given network interface.

3. Use the Interface menu to choose the network interface for your new IP.

4. Type in the IP address and the subnet mask in the appropriate box. For instance, 123.123.123.123/16 or 2002:7b7b:7b7b::1/64.

5. Set the Public IP address (this is an option used for Plesk servers behind NAT). If you want to add a private IP address that you’ll be using to host public-facing websites, you can pair it to a public IP address by adding it in the Set the Public IP address field. This IP address will be used in the domain records that show what’s being hosted on this IP.

6. Choose shared or dedicated for the new IP address.

7. Choose the default SSL/TLS certificate to use with the new IP address. Each IP address is secured with the (self-signed) certificate by default.

8. Choose your preferred FTPS usage policy (on Plesk for Windows).

To make FTP connections secure, the FTP server installed on your Plesk server needs to support FTP over SSL/TLS. For instance, Gene6, Serv-U FTP, IIS FTP 7.x servers support FTP over SSL/TLS.

9. Hit OK and the IP address will be added.

How To Hide IP Addresses In Plesk

You can hide any IP address that’s been registered in Plesk, which means that no one will then be able to see them. When someone looks under Tools & Settings > IP Addresses they simply won’t be there, so they can’t be assigned. But why would you want to do this? Well, one reason is to stop you from accidentally assigning a private IP address to a subscription.

Note: you’ll get an error that says “The IP address is already used for hosting” if you try to hide one when it’s already been assigned to a subscription (or several of them). The IP address will also get tagged with a “blacklisted” label under Tools & Settings > IP Addresses, but you’ll still be able to assign it though.

To hide one or more IP addresses

Open the panel.ini file for editing and add these lines:

[ip]

blacklist="88.10.196.83"

88.10.196.83 is an IP addresses which you want to hide. You can hide both IPv4 and IPv6 IP addresses. Here’s an example:

[ip]

blacklist="88.10.196.83, 2002:5bcc:18fd:c:f482:d057:9ccf:993D"

Unhiding one or more hidden IP addresses

If you have a change of heart for some reason, you can unhide a hidden IP address, remove it from the panel.ini file and Reread IP.

Log in to Plesk, go to Tools & Settings > IP Addresses, and click on Reread IP.

How To Update The IP Addresses List

You can update the list of IP addresses in Plesk. This registers every current IP address on the server’s network interfaces in Plesk, which can be helpful when:

  • you run Plesk in a Virtuozzo container and have added an IP address using the hardware node.
  • you’ve manually added an IP address to the server.

In both instances, you must update the list of IP addresses before you can assign them to subscriptions.

To update the list of IP addresses:

1. Go to Tools & Settings > IP Addresses.

2. Click on Reread IP.

Assigning The Default Website For an IP Address

The first website hosted on an IP address becomes the default website for that address. If several websites are hosted on one IP address when the IP address is used for browsing it’s the default website that’s returned instead of a domain name.

Let’s say that you host several other websites on one IP address as well as your own. You might want visitors to see your website when they visit, and you can make this happen by making your own website the default one.

To set the default website:

1. Go to Tools & Settings > IP Addresses.

2. Click on the IP address you want.

3. Choose the website you’d like from the Default site menu.

4. Click on OK.

Server Management: IP Mapping Guideline

IP Mapping Guideline

When you migrate domains from one server to another, you’ll need to configure them so that they use the destination server’s IP addresses. This process is known as IP mapping, and it’s something that can be done either manually or automatically. For best results you’ll want to have a shared IP address on the server you’re migrating to for each shared IP address on the server you’re migrating from, and the same goes for dedicated IP addresses, too. When the migration is all done, go through the IP addresses that the Migrator assigned and re-assign any that might need attention.

Automatic IP Mapping

The IP mapping process is normally something that happens without the need for any user input, as part of the migration. Plesk Migrator tries to re-allocate the domains being moved to the IP addresses on the destination server in line with these rules:

  • A dedicated IP address that has not been allocated will be assigned to domains that were given a dedicated IP address on the source server, where possible. If not (perhaps because there aren’t any unallocated dedicated IP addresses left on the destination server), the default shared IP address will be used instead.
  • Plesk Migrator will try to assign domains that used the same shared IP address on the source server to a different shared IP address on the destination server, where at all possible. If this can’t be achieved (say, because there aren’t as many shared IP addresses on the destination server as there are on the source server), the default shared IP address will be used instead.

Alternatively, the IP mapping file or the migration list file can be used to go through the IP mapping process manually.

Note: different mapping methods can be combined. For instance, you can use the migration list to stipulate common mapping rules, and then specify particular addresses for certain domains using the mapping file.

Using the Mapping File for IP Mapping

The IP mapping is a plain text file that consists of a pair of columns of IP addresses separated by the whitespace character. Those in the left column are the ones on the server you’re migrating from. They get matched to the ones in the right-hand column, which are the corresponding IP addresses from the server you’re migrating to. The IP mapping file should only contain the IP addresses and no other information—not even comments—should be added to it. Blank lines are permitted though.

Here’s an example of the contents in an IP mapping file:

192.168.1.11 11.53.1.16

192.168.1.12 11.53.1.17

192.168.1.12 11.53.1.17

In this illustration, domains that use the IP address 192.168.1.11 get the IP address 11.53.1.16. Those with the IP addresses 192.168.1.12 and 192.168.1.12, get the IP address 11.53.1.17.

Once the mapping file has been prepared, you can give it to the Plesk Migrator by using this option:

--ip-mapping-file IP_MAPPING_FILE

where IP_MAPPING_FILE is the path to the mapping file (either relative or absolute to the current working directory).

IP Mapping Using the Migration List File

This way of doing IP mapping may be more complex but it gives you greater control over assigning IP addresses. When the file is ready you can edit it, referring to the samples below for reference:

IPv4: 11.53.1.16
domain1.tld
domain2.tld
IPv4: 11.53.1.17
domain3.tld

Here, domains domain1.tld and domain2.tld will be given the IP address 11.53.1.16. Domain domain3.tld will get the IP address 11.53.1.17.

IPv4: shared
domain1.tld
domain2.tld

Here, both domains are assigned a shared IP address.

IPv4: dedicated
domain1.tld
domain2.tld

With this one, each domain gets a randomly chosen dedicated IP address (there have to be no fewer than two unallocated dedicated IP addresses on the server being migrated to).

IPv4: auto
domain1.tld
domain2.tld

Here, each domain gets an IP address in accordance with the automatic IP mapping rules.

IPv6: none
domain1.tld
domain2.tld

In this instance, neither domain gets an IPv6 address, but IPv4 addresses can still be assigned (as a domain can’t be created without an IP address).

IPv4 and IPv6 IP addresses can be assigned to domains using the migration list file. Any domain can receive an IPv4 address, an IPv6 address, or both. When stipulating which IP address will be assigned to a domain, you can either use a particular address or use the placeholders— shared/dedicated/auto/none.

IPv4: 11.53.1.16
IPv6: 2002:5bcc:18fd:d:904c:9277:339a:ce56
domain1.tld

In this case, the domain will be given both the IPv4 and the IPv6 addresses.

When resellers receive IP addresses these are circulated to all domains used for customer accounts as well as the reseller’s own domains.

Reseller: res1
IPv4: 11.53.1.16
domain1.tld
Customer: cust1
domain2.tld
Reseller: res2
domain3.tld

In this case, domains domain1.tld and domain2.tld will get the IP address 11.53.1.16, and the IP address for the domain domain3.tld will be set in accordance with the automatic IP mapping rules.

Note: When manually assigning an IP address to a reseller, the IP address must either be free or one that’s already included in the reseller’s IP pool. With automatic IP mapping, only free IP addresses will be given to resellers.