IPv6 Для сайта
Выставить в конфиге
1 2 3 4 5 6 |
server { server_name domain.ua; listen 443 ssl; listen [::]:443 ssl; .... } |
Проверяем наличие ipv6
1 |
user@ubuntu-nginx:/home/user# sudo modprobe ipv6 |
далее включаем
1 2 3 4 5 |
user@ubuntu-nginx:/home/user# sudo cat /etc/sysctl.conf ###добавляем это в самом низу или раскомментируем, если есть в конфиге net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.all.disable_ipv6 = 0 user@ubuntu-nginx:/home/user# sudo sysctl -p |
и наконец прописываем в интерфейсе
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
user@ubuntu-nginx:/home/user# sudo cat /etc/network/interfaces.d/50-cloud-init.cfg # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} auto lo iface lo inet loopback dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844 8.8.4.4 8.8.8.8 auto eth0 iface eth0 inet6 static pre-up modprobe ipv6 address xxxx:xxxx:3:d0::xxx:2001 netmask 64 gateway xxxx:xxxx:3:d0::1 iface eth0 inet static address x.x.x.x gateway y.y.y.y netmask 255.255.240.0 # control-alias eth0 iface eth0 inet static address 11.29.0.27 netmask 255.255.0.0 |
Ну и перегружаем все. Убедившись что есть доступ из консоли. А то может и зафейлится и тогда будет весело
1 |
user@ubuntu-nginx:/home/user# sudo ifconfig eth0 down; sudo ip addr flush dev eth0; sudo service networking restart; sudo ifconfig eth0 up |