

# Configure IPv6 networking for Lightsail instances
IPv6 networking

This section covers the following topics related to configuring IPv6 on Lightsail instance blueprints:

**Topics**
+ [

# Configure IPv6 connectivity for cPanel instances in Lightsail
](amazon-lightsail-configure-ipv6-on-cpanel.md)
+ [

# Configure IPv6 connectivity for GitLab instances in Lightsail
](amazon-lightsail-configure-ipv6-on-gitlab.md)
+ [

# Configure IPv6 connectivity for Nginx instances in Lightsail
](amazon-lightsail-configure-ipv6-on-nginx.md)
+ [

# Configure IPv6 connectivity for Plesk instances in Lightsail
](amazon-lightsail-configure-ipv6-on-plesk.md)

# Configure IPv6 connectivity for cPanel instances in Lightsail
IPv6 for cPanel and WHM

All instances in Amazon Lightsail have a public and a private IPv4 address assigned to them by default. You can optionally enable IPv6 for your instances to have a public IPv6 address assigned to them. For more information, see [Amazon Lightsail IP addresses ](understanding-public-ip-and-private-ip-addresses-in-amazon-lightsail.md) and [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).

After you enable IPv6 for an instance that uses the cPanel & WHM blueprint, you must perform an additional set of steps to make the instance aware of its IPv6 address. In this guide, we show you the additional steps that you must perform for cPanel & WHM instances.

## Prerequisites


Complete the following prerequisites if you haven't already:
+ Create an cPanel & WHM instance in Lightsail. For more information, see [Create an instance](how-to-create-amazon-lightsail-instance-virtual-private-server-vps.md).
+ Configure your cPanel & WHM instance. For more information, see [Quick start guide: cPanel & WHM on Amazon Lightsail](amazon-lightsail-quick-start-guide-cpanel.md).
**Important**  
Make sure that all software updates and required system reboots are performed before continuing with the steps in this guide.
+ Enable IPv6 for your cPanel & WHM instance. For more information, see [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).
**Note**  
New cPanel & WHM instances created on or after January 12, 2021, have IPv6 enabled by default when they are created in the Lightsail console. You must complete the following steps in this guide to configure IPv6 on your instance even if IPv6 was enabled by default when you created your instance.

## Configure IPv6 on a cPanel & WHM instance


Complete the following procedure to configure IPv6 on a cPanel & WHM instance in Lightsail.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the **Instances** section of the Lightsail home page, locate the cPanel & WHM instance that you wish to configure, and choose the browser-based SSH client icon to connect to it using SSH.  
![\[Browser-based SSH client icon in the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-ssh-quick-connect.png)

1. After you're connected to your instance, enter the following command to open the `ifcfg-eth0` network interface configuration file using Nano.

   ```
   sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
   ```

1. Add the following lines of text to the file if they are not already there.

   ```
   IPV6INIT=yes
   IPV6_AUTOCONF=yes
   DHCPV6C=yes
   ```

   The result should look like the following example.  
![\[Network interfaces configuration file on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-network-interface-configuration-file.png)

1. Press **CTRL\$1C** on your keyboard to exit the file.

1. Press **Y** when prompted to save the modified buffer, then press **Enter** to save to the existing file. This saves the edits you made to the `ifcfg-eth0` network interface configuration file.

1. Close the browser-based SSH window and toggle back to the Lightsail console.

1. In the **Instances** section of the Lightsail home page, choose the actions menu (⋮) for the cPanel & WHM instance, and choose **Reboot**.  
![\[Instance reboot option on the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-instance-reboot.png)

   Wait a few minutes for your instance to be done rebooting before continuing to the next step.

1. In the **Instances** section of the Lightsail home page, make note of the IPv6 address assigned to your cPanel & WHM instance.  
![\[Instance IPv6 address on the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-ipv6-address.png)

1. Open a new browser tab, and sign in to the Web Host Manager (WHM) of your cPanel & WHM instance.

1. In the left navigation pane of the WHM console, choose **Basic WebHost Manager Setup**.  
![\[Basic WebHost Manager Setup option in the navigation pane.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-basic-webhost-manager-menu-option.png)

1. In the **All** tab, find the text for the **IPv6 address to use**, then enter the IPv6 address assigned to your instance. You should have made note of the IPv6 address assigned to your instance from step 9 of this procedure.  
![\[IPv6 address of the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-ipv6-address-entry.png)

1. Scroll to the bottom for the page and choose **Save Changes**.

1. In the left navigation pane of the WHM console, choose **Tweak Settings**.  
![\[Tweak settings option in the navigation pane.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-tweak-settings.png)

1. In the **All** tab, scroll down to find the **Listen on IPv6 Addresses** setting, and set it to **On**.  
![\[Listen to IPv6 address option.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-listen-to-ipv6-addresses.png)

1. Scroll to the bottom for the page and choose **Save**.

1. Toggle back to the Lightsail console.

1. In the **Instances** section of the Lightsail home page, choose the actions menu (⋮) for the cPanel & WHM instance, and choose **Reboot**.  
![\[Instance reboot option on the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-instance-reboot.png)

   Wait a few minutes for your instance to be done rebooting before continuing to the next step.

1. Choose the browser-based SSH client icon for the cPanel & WHM instance to connect to it using SSH.  
![\[Browser-based SSH client icon in the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-ssh-quick-connect.png)

1. After you're connected to your instance, enter the following command to view the IP addresses configured on your instance, and confirm that it is now recognizing its assigned IPv6 address.

   ```
   ip addr
   ```

   You will see a response similar to the following example. If your instance does recognize its IPv6 address, then you will see it listed in the response with a label of **scope global** as shown in this example.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-ssh-ip-addr-ipv6-configured.png)

1. Enter the following command to confirm that your instance is able to ping an IPv6 address.

   ```
   ping6 ipv6.google.com -c 6
   ```

   The result should look like the following example, which confirms that your instance is able to ping IPv6 addresses.  
![\[Ping6 result.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-cpanel-ssh-ping6-result.png)

# Configure IPv6 connectivity for GitLab instances in Lightsail
IPv6 for GitLab

All instances in Amazon Lightsail have a public and a private IPv4 address assigned to them by default. You can optionally enable IPv6 for your instances to have a public IPv6 address assigned to them. For more information, see [Amazon Lightsail IP addresses ](understanding-public-ip-and-private-ip-addresses-in-amazon-lightsail.md) and [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).

After you enable IPv6 for an instance that uses the GitLab blueprint, you must perform an additional set of steps to make the instance aware of its IPv6 address. In this guide, we show you the additional steps that you must perform for GitLab instances.

## Prerequisites


Complete the following prerequisites if you haven't already:
+ Create a GitLab instance in Lightsail. For more information, see [Create an instance](how-to-create-amazon-lightsail-instance-virtual-private-server-vps.md).
+ Enable IPv6 for your GitLab instance. For more information, see [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).
**Note**  
New GitLab instances created on or after January 12, 2021, have IPv6 enabled by default when they are created in the Lightsail console. You must complete the following steps in this guide to configure IPv6 on your instance even if IPv6 was enabled by default when you created your instance.

## Configure IPv6 on a GitLab instance


Complete the following procedure to configure IPv6 on a GitLab instance in Lightsail.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the **Instances** section of the Lightsail home page, locate the GitLab instance that you wish to configure, and choose the browser-based SSH client icon to connect to it using SSH.  
![\[Browser-based SSH client in the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-gitlab-ssh-quick-connect.png)

1. After you're connected to your instance, enter the following command to view the IP addresses configured on your instance.

   ```
   ip addr
   ```

   You will see a response similar to one of the following examples:
   + If your instance does not recognize its IPv6 address, then you will not see it listed in the response. You should continue to complete steps 4 through 9 of this procedure.  
![\[IPv6 not configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-gitlab-ssh-ip-addr-ipv6-not-configured.png)
   + If your instance does recognize its IPv6 address, then you will see it listed in the response with a `scope global` as shown in this example. You should stop here; you do not need to complete steps 4 through 9 of this procedure because your instance is already configure to recognize its IPv6 address.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-gitlab-ssh-ip-addr-ipv6-configured.png)

1. Toggle back to the Lightsail console.

1. In the **Instances** section of the Lightsail home page, choose the actions menu (⋮) for the GitLab instance, and choose **Reboot**.  
![\[Instance reboot option on the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-gitlab-instance-reboot.png)

   Wait a few minutes for your instance to be done rebooting before continuing to the next step.

1. Toggle back to the SSH session of your GitLab instance.

1. Enter the following command to view the IP addresses configured on your instance, and confirm that it is now recognizing its assigned IPv6 address.

   ```
   ip addr
   ```

   You will see a response similar to the following example. If your instance does recognize its IPv6 address, then you will see it listed in the response with a label of `scope global` as shown in this example.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-gitlab-ssh-ip-addr-ipv6-configured.png)

# Configure IPv6 connectivity for Nginx instances in Lightsail
IPv6 for Nginx

All instances in Amazon Lightsail have a public and a private IPv4 address assigned to them by default. You can optionally enable IPv6 for your instances to have a public IPv6 address assigned to them. For more information, see [Amazon Lightsail IP addresses](understanding-public-ip-and-private-ip-addresses-in-amazon-lightsail.md) and [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).

After you enable IPv6 for an instance that uses the Nginx blueprint, you must perform an additional set of steps to make the instance aware of its IPv6 address. In this guide, we show you the additional steps that you must perform for Nginx instances.

## Prerequisites


Complete the following prerequisites if you haven't already:
+ Create an Nginx instance in Lightsail. For more information, see [Create an instance](how-to-create-amazon-lightsail-instance-virtual-private-server-vps.md).
+ Enable IPv6 for your Nginx instance. For more information, see [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).
**Note**  
New Nginx instances created on or after January 12, 2021, have IPv6 enabled by default when they are created in the Lightsail console. You must complete the following steps in this guide to configure IPv6 on your instance even if IPv6 was enabled by default when you created your instance.

## Configure IPv6 on a Nginx instance


Complete the following procedure to configure IPv6 on a Nginx instance in Lightsail.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the **Instances** section of the Lightsail home page, locate the Ubuntu instance that you wish to configure, and choose the browser-based SSH client icon to connect to it using SSH.  
![\[Browser-based SSH client icon in the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/instances/resource_cards/nginx-ssh-quick-connect.png)

1. After you're connected to your instance, enter the following command to determine if your instance is listening to IPv6 requests over port 80. Be sure to replace *<IPv6Address>* with the IPv6 address assigned to your instance.

   ```
   curl -g -6 'http://[<IPv6Address>]'
   ```

   Example:

   ```
   curl -g -6 'http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]'
   ```

   You will see a response similar to one of the following examples:
   + If your instance is not listening to IPv6 requests over port 80, then you will see a response with a **Failed to connect** error message. You should continue to complete steps 4 through 9 of this procedure.  
![\[IPv6 not configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-nginx-ssh-curl-result-not-configured.png)
   + If your instance is listening to IPv6 requests over port 80, then you will see a response with the HTML code of the home page of your instance as shown in the following example. You should stop here; you do not need to complete steps 4 through 9 of this procedure because your instance is already configure to for IPv6.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-nginx-ssh-curl-result-configured.png)

1. Enter the following command to open the nginx.conf configuration file using Vim.

   ```
   sudo vim /opt/bitnami/nginx/conf/nginx.conf
   ```

1. Press `I` to enter insert mode in Vim.

1. Add the following text below the `listen 80;` text that is already in the file. You might need to scroll down in Vim to see the section where you need to add the text.

   ```
   listen [::]:80;
   ```

   The file will look like the following when done:  
![\[Nginx configuration file on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-nginx-ssh-nginx-conf-file.png)

1. Press the **Esc** key to exit insert mode in Vim, then type `:wq!` and press **Enter** to save your edits (write) and quit Vim.

1. Enter the following command to restart the services of your instance.

   ```
   sudo /opt/bitnami/ctlscript.sh restart
   ```

1. Enter the following command to determine if your instance is listening to IPv6 requests over port 80. Be sure to replace *<IPv6Address>* with the IPv6 address assigned to your instance.

   ```
   curl -g -6 'http://[<IPv6Address>]'
   ```

   Example:

   ```
   curl -g -6 'http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]'
   ```

   You will see a response similar to the following example. If your instance is listening to IPv6 requests over port 80, then you will see a response with the HTML code of the home page of your instance.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-nginx-ssh-curl-result-configured.png)

# Configure IPv6 connectivity for Plesk instances in Lightsail
IPv6 for Plesk

You must perform an additional set of steps to make an instance that uses the Plesk blueprint aware of its IPv6 address. In this guide, we show you the additional steps that you must perform for Plesk instances.

## Prerequisites


Complete the following prerequisites if you haven't already:
+ Create an Plesk instance in Lightsail. For more information, see [Create an instance](how-to-create-amazon-lightsail-instance-virtual-private-server-vps.md).
+ Enable IPv6 for your Plesk instance. For more information, see [Enable or disable IPv6](amazon-lightsail-enable-disable-ipv6.md).
**Note**  
Lightsail Plesk instances created on or after January 12, 2021, have IPv6 enabled by default. You must complete the following steps in this guide to configure IPv6 on your instance even if IPv6 was enabled by default when you created your instance.

## Configure IPv6 on a Plesk instance


Complete the following procedure to configure IPv6 on a Plesk instance in Lightsail.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the **Instances** section of the Lightsail home page, locate the Plesk instance that you wish to configure, and choose the browser-based SSH client icon to connect to it using SSH.  
![\[Browser-based SSH client icon in the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-plesk-ssh-quick-connect.png)

1. After you're connected to your instance, enter the following command to view the IP addresses configured on your instance.

   ```
   ip addr
   ```

   You will see a response similar to one of the following examples:
   + If your instance does not recognize its IPv6 address, then you will not see it listed in the response. You should continue to complete steps 4 through 7 of this procedure.  
![\[IPv6 not configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-plesk-ssh-ip-addr-ipv6-not-configured.png)
   + If your instance does recognize its IPv6 address, then you will see it listed in the response with a `scope global` as shown in this example. You should stop here; you do not need to complete steps 4 through 7 of this procedure because your instance is already configured to recognize its IPv6 address.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-plesk-ssh-ip-addr-ipv6-configured.png)

1. Toggle back to the Lightsail console.

1. In the **Instances** section of the Lightsail home page, choose the actions menu (⋮) for the Plesk instance, and choose **Reboot**.  
![\[Instance reboot option on the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-plesk-instance-reboot.png)

   Wait a few minutes for your instance to be done rebooting before continuing to the next step.

1. Toggle back to the SSH session of your Plesk instance.

1. Enter the following command to view the IP addresses configured on your instance, and confirm that it is now recognizing its assigned IPv6 address.

   ```
   ip addr
   ```

   You will see a response similar to the following example. If your instance does recognize its IPv6 address, then you will see it listed in the response with a label of `scope global` as shown in this example.  
![\[IPv6 configured on the instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/lightsail-plesk-ssh-ip-addr-ipv6-configured.png)

Follow the step-by-step instructions to learn how to configure IPv6 on your Lightsail instance blueprints.

The guide covers various instance blueprints, including cPanel, GitLab, Nginx, and Plesk. The procedures involve connecting to your instance via SSH, modifying network configuration files, restarting services, and verifying that the instance recognizes its assigned IPv6 address. By following this guide, you can ensure that your Lightsail instances are properly configured to utilize both IPv4 and IPv6 addresses, enabling better connectivity and preparing your applications for the future of the internet.