Security/DNSSEC-TLS-nginx
< Security
Jump to navigation
Jump to search
This page details how to set up a virtual machine running a modified version of nginx that uses a self-signed certificate with the DNSSEC TLS extension to authenticate https sessions.
- Set up a linux VM and enable a host-only network adapter so you can talk to it as well as a NAT'd adapter so it can talk to the internet (outside the scope of this article)
- In that VM, do the following:
- Install and set up bind9:
- 'apt-get install bind' or bind9 or something
- Set up keys and zone files (see here, except using dnssec-keygen and dnssec-signzone instead of zonesigner) (NB: for testing purposes, you'll probably want to create an entire fake hierarchy, including root keys. Whatever your root key is, it'll have to be trusted by your client program. For firefox, this means modifying root_keys in security/dnssec/rootkeys.h (the plural there is unintentional and should probably be changed)).
- Make a self-signed certificate
- Make a TLSA record using cert2tlsa.sh (and put this in your zone file)
- Sign the zones
- Start the server
- Get sources:
- ldns-1.6.10.tar.gz
- nginx-1.0.4.tar.gz (not the most recent version - I'll update the patch against it when I get a chance)
- openssl-1.0.0d.tar.gz
- Get patches:
- Install a local copy of ldns:
- Untar the archive and cd to the directory
- Run './configure --disable-gost --prefix=$HOME/local'
- Run 'make', 'make install'
- Use generate.c to make a dnssec chain
- Install a local copy of openssl:
- Untar the archive and cd to the directory
- Apply the patch
- Run './config', 'make'
- Build nginx:
- Untar the archive and cd to the directory
- Apply the patch
- Run './configure --with-openssl=$HOME/openssl-1.0.0d --with-http_ssl_module --without-http_rewrite_module --prefix=`pwd`', 'make'
- Make sure you don't have other webservers running on the machine (Ubuntu seems to have one by default)
- Put the paths to the appropriate certificate files in conf/nginx.conf (i.e. the certificate indicated by the TLSA record)
- Put the path to the appropriate dnssec chain file in conf/nginx.conf (created using generate.c, above)
- Start nginx: 'sudo ./obj/nginx'