Rimuovere un indirizzo IPv6 pubblico in un server Linux (Ubuntu)

In questo articolo ti mostriamo come rimuovere un indirizzo IP pubblico da un server Linux con sistema operativo Ubuntu. Per farlo, procedi come segue:

Requisiti:
  • Hai annullato l'assegnazione dell'indirizzo IPv6 pubblico aggiuntivo nel Cloud Panel.
  • Accedi al server come amministratore.

  • Per rimuovere l'indirizzo IPv6 aggiuntivo, è necessario eliminare le seguenti voci su /etc/network/interfaces
    # The primary network interface
    allow-hotplug ens192
    iface ens192 inet dhcp
    # IPV6 Setup
    iface ens192 inet6 static
    accept_ra 0
    address INDIRIZZO-IPv6-PRINCIPALE
    netmask 64
    gateway fe80::1
    iface ens192 inet6 static
    accept_ra 0
    address INDIRIZZO-IPv6-aggiuntivo
    netmask 64
    gateway fe80::1

    Esempio:
    [root@localhost ~]# vi /etc/network/interfaces
    # The primary network interface
    allow-hotplug ens192
    iface ens192 inet dhcp
    # IPV6 Setup
    iface ens192 inet6 static
    accept_ra 0
    address 2001:ba0:2020:1cc:3fe0:4d12:cd52:491a
    netmask 64
    gateway fe80::1
    iface ens192 inet6 static
    accept_ra 0
    address 2001:ba0:2020:1cc:b62d:b9ef:e843:a0c1
    netmask 64
    gateway fe80::1

  • Per riavviare la rete, immetti il seguente comando:
    [root@localhost ~]# /etc/init.d/networking restart