Nginx (some call it “EngineX”) is widely used as a web server, but it can also be configured as a reverse proxy, load balancer, mail proxy or HTTP cache server. The scope of this article is limited to the use of Nginx as a web server.
The Nginx software package has supported Internet Protocol version 6 (IPv6) since at least 2010, although IPv6 support is not enabled by default. The authoritative source for Nginx Open Source Software (OSS) is nginx.org and for Nginx PLUS (the commercial product) the authoritative source is Nginx, Inc.
To use Nginx OSS as a web server supporting IPv6, the first step is to complete the 8 steps described in this Get Your Site Ready for IPv6 article for the host computer your Nginx web server is or will be installed on.
Next, to install Nginx under various Linux/Unix operating systems follow the directions given in this Nginx: Configure and Install With IPv6 Networking Support Enabled web page. A more detailed set of directions with configuration options for additional operating systems and some cloud environments can be found on the Nginx. Inc. website here. It is also possible to install Nginx OSS in a Microsoft Windows environment (Caution: There are known issues in this environment).
After completing the installation, scan the FEATURED ARTICLES list in the right hand column of the Nginx: Configure and Install With IPv6 Networking Support Enabled web page to see if any of them are relevant to your planned use of Nginx OSS. For example:
How to enable gzip compression in nginx server
or
Top 25 Nginx Web Server Best Security Practices.
Advanced configuration features of Nginx OSS are documented on the Nginx. Inc. website docs.nginx.com. To review these features, on that website enter “open source” in the Search all documentation box, click on the search icon (), and then scan the search results for relevant features. Many (but not all) of the articles returned by the search will contain “open source” or “Open Source” in the title. If a feature of interest does not indicate “open source” or “Open Source” in the title, view the article anyway. The feature may be available for Nginx OSS even though the title does not explicitly indicate that is the case.
Also, a web search using any web search engine may reveal additional configuration changes you might want to consider, such as
Dual-Stack Configuration of IPv4 and IPv6,
However, be careful! You will want to verify that any configuration changes your web search reveals specifically apply to Nginx OSS. The Dual-Stack Configuration of IPv4 and IPv6 configuration change above, for example, is only available for Nginx PLUS installations.
The Apache web server has had Internet Protocol version 6 (IPv6) support built in and enabled by default since 2002 (with the release of version 2.0.43). The authoritative source for Apache Web Server is the Apache HTTP Server Project, which does not explicitly address many IPv6 topics. It does address Special IPv6 Considerations for mapping IPv4 and IPv6 addresses.
Complete the 8 steps described in this Get Your Site Ready for IPv6 article for the host computer your Apache web server is or will be installed on.
The configuration information shown below is from the Linux IPv6 HOWTO (en) website. While old, it is still useful. Additional old articles about Apache web server IPv6 configuration for Linux and virtual hosts are available here.
3. Webserver Apache2 (httpd2)
Apache web server supports IPv6 native by maintainers since 2.0.14. Available patches for the older 1.3.x series are not current and shouldn't be used in public environment, but available at KAME/Misc.
3.1. Listening on IPv6 addresses
Note: virtual hosts on IPv6 addresses are broken in versions until 2.0.28 (a patch is available for 2.0.28). But always try latest available version first because earlier versions had some security issues.
3.1.1. Virtual host listen on an IPv6 address only
Listen [2001:0db8:100::1]:80
<VirtualHost [2001:0db8:100::1]:80>
ServerName ipv6only.yourdomain.yourtopleveldomain # ...sure more config lines
</VirtualHost>
3.1.2. Virtual host listen on an IPv6 and on an IPv4 address
Listen [2001:0db8:100::2]:80
Listen 1.2.3.4:80
<VirtualHost [2001:0db8:100::2]:80 1.2.3.4:80>
ServerName ipv6andipv4.yourdomain.yourtopleveldomain
# ...sure more config lines
</VirtualHost>
This should result after restart in e.g.
# netstat -lnptu |grep "httpd2\W*$" tcp 0 0 1.2.3.4:80 0.0.0.0:* LISTEN 12345/httpd2
tcp 0 0 2001:0db8:100::1:80 :::* LISTEN 12345/httpd2
tcp 0 0 2001:0db8:100::2:80 :::* LISTEN 12345/httpd2
For simple tests use the telnet example already shown.
3.1.3. Additional notes
· Apache2 supports a method called “sendfile” to speedup serving data. Some NIC drivers also support offline checksumming. In some cases, this can lead to connection problems and invalid TCP checksums. In this cases, disable “sendfile” either by recompiling using configure option “--without-sendfile” or by using the "EnableSendfile off" directive in configuration file.
A description of how the Samba application was IPv6-enabled is given on slides 29-35.
Preparing Samba for Windows Server 2008 and IPv6, from Erion, Ltd.
For more recent presentations and additional information on using SAMBA and the Common Internet File System (CIFS) with IPv6, please visit this blog.
Current information about open source sendmail after the acquisition of Sendmail, Inc. by Proofpoint, Inc. in 2013 is available on the Proofpoint website. Information for earlier versions of Sendmail up to 8.15.2 (released in 2015) is available on this website. Also, an archive of Sendmail, Inc. Documentation, Tips and Tricks, and Support FAQ files is available on this website.
An introduction to setting up the sendmail daemon versions 8.10.0 and later on many Linux systems to support Internet Protocol version 6 (IPv6) appears below. Because of the many variations among implementations and between versions of Sendmail, differences are to be expected. Earlier versions can be more involved to setup, when it is even possible.
Notes:
1. Make sure you have completed the applicable steps described in this Get Your Site Ready for IPv6 article for the host computer your Sendmail daemon is installed on. (That article was written for a web server, but the DNS-specific steps also apply to Sendmail.)
2. Sendmail by default typically adds a Daemon_Options for port 587. When you want that behavior, omit the first line below. Otherwise, include the first line and sendmail will then use just port 25.
To configure sendmail to listen on both IPv4 and IPv6 at the same time:
FEATURE(`no_default_msa', `dnl') dnl
DAEMON_OPTIONS(`Port=submission, M=Ea, Name=MSA, Family=inet6') dnl
DAEMON_OPTIONS(`Port=smtp,Name=MTA, Family=inet6') dnl
Then "make" and restart sendmail.
On many O/Ses, sendmail will accept IPv4 via the IPv6 socket without any explicit IPv4 configuration. If not, it may be necessary to use the line:
DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6') dnl
instead of the last line above.
A more extensive example of an IPv6 configuration for sendmail is available here.
For FreeBSD, an example configuration file is available here.
Internet Information Services (IIS) 6.x had limited support for IPv6, but IIS7.x and later has good support for IPv6 features, from creating site bindings to logging to security features like IP Restriction. IIS7.x and later versions also work well under Server 2008 and later. Using IPv6 can be as simple as starting IIS after installing it on your system. IPv6 support with earlier operating systems is problematic.
A basic IIS6.x configuration example would be
Open IIS Manager (inetmgr)
Select the site you wish to enable IPv6 on
From the Action pane choose “Bindings…”
type = http (for a basic web server)
IP address = ipv6 address (or use the drop down list)
port = 80
host name = the name you want the server to respond to
Click Ok
Configuring IIS7.x and later changed. The IIS6.x metabase was replaced by an XML-based procedure. Microsoft provides a website for general IIS support: www.iis.net. For more detailed information about using IIS7.0 with IPv6 visit Nazim's IIS Security Blog. Another IIS7.0 write-up is available on the SoftLayer KnowledgeBase. Remember to install an updated file transfer protocol (FTP) publishing service. It was released after IIS7.0. This step is mentioned by both articles. Articles on the Microsoft learn.microsoft.com website for IIS configuration are available: IIS7.5, IIS8.0, and IIS8.5. (IIS10.0 configuration is just like IIS8.5 except IIS10.0 is only available on Windows 10/11.)
Limited information about IIS6.x support for IPv6 running under Server 2003 is available in this article and security guide.
For all versions of IIS, complete the 8 steps described in this Get Your Site Ready for IPv6 article for the host computer your IIS web server is installed on.
Note: If you want both IIS and an instance of the Microsoft .NET Framework on the same computer in Windows Server 2003 (also applies to 2008 and later), it is better to install IIS first. (If the Microsoft .NET Framework was installed before installing IIS, see this article for a possible solution).