Learn about Centmin Mod LEMP Stack today
Register Now

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:
    3:41 PM
    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

    28,385
    6,445
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,545
    Local Time:
    4:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 1
  3. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +161
    Local Time:
    2:41 PM
    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

    28,385
    6,445
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,545
    Local Time:
    4:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    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:
    +161
    Local Time:
    2:41 PM
    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.
     
    • Like Like x 1