Welcome to Centmin Mod Community
Become a Member

IPv6

Discussion in 'System Administration' started by Zykov, Jun 5, 2014.

  1. Zykov

    Zykov Member

    31
    7
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    11:06 AM
    Nginx 1.7.1
    MariaDB 10
    I've disabled all IPv6 related stuff in my CentOS 6.5 before installing Centmin Mod - to increase security and because I can't use it anyway (blame my provider and old hardware).
    But recently I've read this: https://en.wikipedia.org/wiki/IPv4_address_exhaustion and that: https://ipv6.he.net/statistics.
    And now I'm in sort of panic :facepalm:
    So do you people use IPv6? Via tunneling or directly? Is there any free solution for IPv4 -> IPv6?
    And how's about IPv6 on Centmin Mod? Is Centmin Mod components IPv6 ready? Please, calm me down :nailbiting:

     
    Last edited: Jun 5, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Sometimes I wonder from end user perspective, what the panic is about IPv6... especially if you already have servers with IPv4 and have your IPs allocated.

    It's like Apple announcing there would be a shortage of IPhone 5s and everyone already with an IPhone 5 buying a second one for the sake of it.

    The ones who need to worry about it more would be the ISP and upstream web hosting providers I guess.

    Centmin Mod centmin.sh has an option for Nginx compiled with IPv6 but you still need to configure your Nginx vhost manually for IPv6 listen directives.
     
    Last edited: Jun 5, 2014
  3. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    10:06 AM
    latest
    latest
    I was given 2 ipv6 addresses in a new VPS and I've compiled nginx with ipv6 support

    # nginx -V
    nginx version: nginx/1.7.1
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
    TLS SNI support enabled
    configure arguments: ... --with-ipv6 ....

    according to this

    http://kovyrin.net/2010/01/16/enabling-ipv6-support-in-nginx/

    I should edit all instances of listen 80; to listen [::]:80;

    "to make sure you tell your nginx to bind on both IPv4 and IPv6 addresses" according to the link

    so that's what I did in virtual.conf and in the other conf as long as it has the listen directive

    server {
    # listen 80;
    listen [::]:80 default_server backlog=256;

    $ ngxrestart

    But when I try to visit my IP address it can't connect. If I undo the edit the nginx page shows. ipv6 is enabled in csf.

    Anyone made this work? Help please.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    1. did you add AAAA records to update your domain DNS
    2. make sure you changed all Nginx conf's line for listen 80 use this command to check

    Code:
    grep -R ' 80;' /usr/local/nginx/conf/*
    i.e. on default install would return

    Code:
    /usr/local/nginx/conf/conf.d/virtual.conf:#         listen   80;
    /usr/local/nginx/conf/conf.d/mydomain.com.conf:#            listen   80;
    /usr/local/nginx/conf/conf.d/demodomain.com.conf:            listen   80;
    /usr/local/nginx/conf/conf.d/demodomain.com.conf:            listen   80;
    /usr/local/nginx/conf/nginx.conf.default:        listen       80;
     
  5. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    10:06 AM
    latest
    latest
    I got it. It should be

    listen [::]:80 ipv6only=off default_server backlog=256;

    so if you don't turn it off it only listens to ipv6 sockets.