Use VPS host to do website, let your website also support IPV6

Source: Internet
Author: User
Tags vps

This article is written to students in VPS, even if your VPS provider does not support IPV6, you can make your site IPv6 ready. If you have a lot of readers in the Education network, do this is very worthwhile, because the education Network has no international connection, but there are free IPv6. If your VPS service provider supports IPV6 then you can look straight from the 5th step, if not, please look at it from the beginning. Currently only on the Diahosting VPS Test Success (standalone server of course, there is no problem, as for personal computers, must have a public IP address, because the kernel is required to support IPV6 and Tun/tap, so may be part of Xen, OpenVZ is not supported). Ready, let's begin.

1. Fundamentals

Although your VPS does not support IPV6, but we can solve through the IPV6 tunnel, which is usually said IPv6 over IPv4, can be understood as IPv4 on the establishment of a small pipeline of IPv6. We use the Hurricane Electronics to provide free IPv6 tunnel broker,he has the world's largest IPv6 backbone, providing IPV6 tunnel Broker services around the world.

2. Sign up for the free he IPv6 tunnel Broker

Registered Address: http://tunnelbroker.net/, click "Register" to register, the registration process is very simple, not much to say.

3. Add Tunnel

Click "Create Regular Tunnel" on the Left:

In "IPV4 endpoint" fill in your VPS IP address, he will be based on your browser's IP address to help you select the server, but not necessarily the best, you have to base on your VPS location, select the server address, my is the west of the United States VPS, so I chose the Fremont, CA, US server, click "Override" to select the server.

Then click "Submit" to establish tunnel success.

4. Settings on the VPS

Go back to the first page of He IPv6 Tunnel broker and click on the tunnel you just created, and there will be more information about this tunnel:

You can see that he assigned you A/64 IPv6 address, that is, you have 2 of the 64-time address, this life is not finished, haha. In the details below, there is a way to set up your VPS, click "Show Config" will come out to set the method:

Execute these commands on your VPS. Test to see if the setting is successful, ping6 he.net, if similar to the following diagram, the configuration is successful:

OK, your VPS also supports IPV6.

5. Let the website IPv6 ready

It's not going to work, and you have to let your HTTP server support IPV6. The Apache 2.0 version began to support Ipv6,nginx from 0.7.36 onwards to support IPV6. We only talk about the Nginx configuration method, others can explore their own.

My VPS is lnmp one-click installation package: http://lnmp.org/, the following is explained in the installation path in the LNMP in the installation path will prevail.

Recompile the Nginx to support the IPV6. Not detailed said, the Sun orders, the most critical sentence is "–with-ipv6":

wget http://nginx.org/download/nginx-0.8.32.tar.gz
tar –xvzf nginx-0.8.32.tar.gz
CD nginx-0.8.32
./configure--user=www--group=www--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module- -with-ipv6
make && make install

At the terminal execution Ifconfig, you can see your IPv6 address:

Listen 80 in your virtual machine configuration file, replace it all with listen ip:80, otherwise it won't start. Add a listen to the virtual machine you want to support IPV6 [ipv6]:80, after configuration, as shown in the following figure:

Server {
Listen 216.45.55.20:80;
Listen [2001:470:1f04:873::2]: 80;
server_name kangzj.net;

..................
}

The installation configuration is complete. Stop the old Nginx and start the newly compiled Nginx:

Killall Nginx
/usr/local/nginx/sbin/nginx

6. Increase the DNS AAAA record for the IPV6 address

This requires your DNS support AAAA record, which is the IPV6 record. Now basic all the domain registrar's DNS are supported, if not supported, you can use the Dnspod service, is free, and supports AAAA records.

My is the name.com domain name, in itself supports, does not have the trouble. After the addition, the domain name will have two records, A, a aaaa:

OK, wait for it to come into effect. After it comes into effect, if the user network supports IPV6, the IPV6 address will be accessed. If only the IPV4 network will access the IPV4 address.

7. PostScript

Originally thought only native IPv6 can provide network service, I was wrong, go tunnel also can. This VPS business support IPV6 does not matter, we can solve their own, DIY long live.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.