• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Nginx IPV6 Reverse Proxy With SSL To Add IPV6 (Full Guide + Configs)

By Abhishek Ghosh June 3, 2017 8:55 am Updated on June 3, 2017

Nginx IPV6 Reverse Proxy With SSL To Add IPV6 (Full Guide + Configs)

Advertisement

Previously we discussed about Nginx IPv6 reverse proxy with SSL to add IPV6 to IPV4 ONLYservers. In this guide we will write in an easy way the same matter in a way that any level of user who has no working experience with IPV6 can easily add own IPV6. Additionally we will give full working configurations.

There are virtual servers like VPSDime or dedicated servers which does not cost a bomb but IPV6 is kept to off. In such cases, using Aruba Cloud like services with their 1GB RAM at 1 Euro per month instances with IPV6, you can easily create globally available, geographically distributed network. You need a good DNS service like Dyn DNS or just free of cost Hurricane Electric DNS for easy to deploy configuration. Your main server has an IPV4 address which is A record on DNS. After following this guide, you will get an IPV6 from other server like Aruba in our example, which you can add as AAAA record in DNS. IPV6 usually a set of address and many a times users find difficult find own IPV6 address. We will cover it too.

Nginx IPV6 Reverse Proxy With SSL To Add IPV6

 

Steps To Use Nginx IPV6 Reverse Proxy With SSL To Add IPV6 To Your Website

 

First follow your way or our way to setup a server (important as we talked about how to secure the server too) on Aruba like cheaper virtual server service where servers have IPV6 support at budget.

Advertisement

---

 

Next step is simply installing Nginx, as for Ubuntu :

Vim
1
2
3
apt update
apt upgrade
apt install nginx-extras

We have two files to configure :

Vim
1
2
/etc/nginx/sites-available/default
/etc/nginx/nginx.conf

First, open the /etc/nginx/nginx.conf file :

Vim
1
nano /etc/nginx/nginx.conf

and add these within http { } context :

Vim
1
2
3
4
proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=backcache:8m max_size=50m;
proxy_cache_key "$scheme$request_method$host$request_uri$is_args$args";
proxy_cache_valid 200 302 10m;
proxy_cache_valid 404 1m;

Save the file. Create the /var/lib/nginx/cache directory and make it writable :

Vim
1
2
3
sudo mkdir -p /var/lib/nginx/cache
sudo chown www-data /var/lib/nginx/cache
sudo chmod 700 /var/lib/nginx/cache

Next open /etc/nginx/sites-available/default :

Vim
1
nano /etc/nginx/sites-available/default

Make it like this, where http://thecustomizewindows.com is your website hosted on IPV4 only server :

Vim
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
27
28
29
30
31
32
33
34
server {
    listen 80;
    listen  [::]:80 ipv6only=on;
    server_name localhost;
    location / {
        proxy_pass http://thecustomizewindows.com;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
server {
    listen 443;
    listen  [::]:443 ssl http2 ipv6only=on;
    server_name localhost;
# SSL configuration starts
       ssl on;
       ssl_certificate /etc/nginx/ssl/bundle.crt;
       ssl_certificate_key /etc/nginx/ssl/thecustomizewindows.com.key;
       ssl_dhparam /etc/nginx/ssl/dhparam.pem;
       ssl_trusted_certificate /etc/nginx/ssl/root-inter.cert;
       ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
       ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
       ssl_prefer_server_ciphers on;
# SSL configuration ends
    location / {
        proxy_pass https://thecustomizewindows.com:443;
       proxy_redirect     off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Run nginx -t command to test and restart Nginx with service Nginx restart command. If that server’s IP is 31.14.138.110, with cURL, you’ll get 301 header on the HTTPS :

Vim
1
2
3
4
5
6
7
8
curl -I -k https://31.14.138.110
HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.0 (Ubuntu)
Date: Sat, 03 Jun 2017 08:31:07 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomainsi; preload
...

It is from that IPV4 server, it is not IPV6. This thing will happen :

Vim
1
2
3
4
5
6
7
8
     A Record                   AAAA Record
+-------------------+     +---------------------+
| Dedicated Server  |====>| Virtual Server      |   ===> Headers and HTML passed
|                   |     | With IPv6 running   |
| With IPv4 Only    |     | Nginx reverse proxy |
| running Apache    |     +---------------------+
| or Nginx          |
+-------------------+

After everything is complete, add the IPV6 as AAAA record on DNS with very low TTL like 5 minutes. Test your website for IPV6 by browsing with online free IPV6 proxy browser here :

Vim
1
http://www.ipv6proxy.net

 

How I Will Know My IPV6?

 

Run this command :

Vim
1
/sbin/ifconfig eth0 |  awk '/inet6/{print $3}'

You’ll get output like this :

Vim
1
2
fe80::250:56ff:fe95:ff3/64
2a00:6d40:40:506e::1/64

The second one set, i.e. 2a00:6d40:40:506e::1/64 likely to be your set of IPV6 IP. The First part is :

Vim
1
2a00:6d40:40:506e::1

That is your one IPV6 address. You can do cURL with it on server :

Vim
1
curl -I -k https://[2a00:6d40:40:506e::1]

You’ll receive 301 header :

Vim
1
2
3
4
5
6
7
curl -I -k https://[2a00:6d40:40:506e::1]
HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.0 (Ubuntu)
Date: Sat, 03 Jun 2017 08:45:28 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
....

That is correct. As your server does not have IPV6, there will be 301 from IP but after adding to DNS as AAAA record, you’ll get normal website. Of course, your DNS and CDN must support IPV6 too, else scripts, images will not load from CDN.

 

Full Nginx IPV6 Reverse Proxy With SSL Configuration On GitHub

 

We have the full Nginx IPV6 Reverse Proxy with SSL configuration on GitHub to easily use it.

Tagged With nginx ipv6 , can nginx reverse proxy to extrenal ip address , ip proxy ssl , proxy forward ipv6 localhost traffic to ipv4 nginx , reverse proxy nginx ipv6 , nginx proxypass ipv6 localhost , nginx remote_addr ipv6 , x-forwarded-for nginx ipv6 , nginx https ipv6 deaktivieren , how to make a one to one connection in ipv6 using nginx?

This Article Has Been Shared 373 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Nginx IPV6 Reverse Proxy With SSL To Add IPV6 (Full Guide + Configs)

  • Cloud Storage : Architecture and Technology

    Cloud Storage is a storage model based on networks, designed in the 1960s. Cloud storage services can be accessed by API or via web interface easy to all users.

  • Cloud Computing India : How Much Safe to Opt for Indian Datacenter

    Cloud Computing India is on the rise despite high bandwidth charges due to less incurred cost for skilled management. But, is your data is secured ?

  • Hybrid Cloud and the Era of Startup

    Hybrid Cloud Computing has brought the computational power in the pockets of all. Anyone with a credit card in pocket can be access the largest facilities now.

  • Local Clouds Offer Little Protection

    Local Clouds, in this PRISM era is promoted or sometimes just said without any influence to confer more protection to privacy and security. But this is not the truth.

  • Ways To Backup MySQL Database And Save To Cloud Storage

    Here Are Ways To Backup MySQL Database And Save To Cloud Storage Including OpenStack Swift From SSH Side. Needed Scripts Has Been Included.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023
  • ESP32 Arduino Water Tank Level Monitoring Using Laser ToF Sensor March 23, 2023
  • Exploring the Benefits and Advantages of Microsoft’s Operating System March 22, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Nginx IPV6 Reverse Proxy With SSL To Add IPV6 (Full Guide + Configs)," in The Customize Windows, June 3, 2017, March 26, 2023, https://thecustomizewindows.com/2017/06/nginx-ipv6-reverse-proxy-ssl-add-ipv6-full-guide-configs/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT