What Is IPV6 ?
On this page
IPv6 which stands for the Internet Protocol version 6 is the newest version of the Internet Protocol, designed to replace IPv4. It provides a much larger address space, better performance, improved security features, and modernizes how devices communicate on the internet.
The goal of this this lesson is to:
- Learn how to configure IPv6 manually using
systemd-networkdwith static address, gateway, and routes. - Understand dual-stack networking by running IPv4 and IPv6 together on the same server.
- Ensure services and their ports listen on IPv6, and verify them using tools like
ssandip. - Add and test IPv6 DNS records (AAAA) so your domain resolves correctly over IPv6.
After this we can get an IPV6 Certification. An IPV6 Certification is verifying, and proving that your server and services fully support IPv6.
You need to understand how this differs from HTTPS certificates because they are completely different concepts.
- HTTPS certificate: Proves website identity & encrypts traffic
- IPv6 certification: Proves IPv6 connectivity & correctness
Step 1: Setup
Create .pve-ignore so Proxmox won't overwrite your network file at boot.
touch /etc/systemd/network/.pve-ignore.eth0.network
Write the systemd-networkd file for a static IPv4 and IPv6 dual stack configuration. Create and edit this file.
nano /etc/systemd/network/eth0.networkWhat this does:
- nano = creates file and then opens it in nano editor
File contents for /etc/systemd/network/eth0.network.
[Match]
Name=eth0
[Network]
# Should already be there for ipv4
Description=Interface eth0 autoconfigured by PVE
Address=193.191.176.212/24
Gateway=193.191.176.254
DHCP=no
IPv6AcceptRA=no
# Add these new lines for ipv6
Address=2001:6a8:2880:a020::d4/64
Gateway=2001:6a8:2880:a020::feRestart systemd-networkd to apply changes.
systemctl restart systemd-networkdVerify the ipv6 address.
ip -6 addr show dev eth0
ip -6 route showWhat this does:
- ip = shows and manages IP addresses
The output should include.
- Your ipv6:
inet6 2001:6a8:2880:a020::d4/64 scope global - And the route to
::/0via2001:6a8:2880:a020::fe
Step 2: Port control
Ensure the IPv6 chains ip6tables allow these ports. We want to make sure that all our previous labs also work with ipv6.
ip6tables -A INPUT -p tcp --dport 25 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 53 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 80 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 443 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 143 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 993 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 22345 -j ACCEPTPort details:
- 25 = used for SMTP by Postfix
- 53 = used for DNS by Bind
- 80 = used for HTTP by Apache2
- 443 = used for HTTPS by Apache2
- 143 = used for IMAP by Dovecot
- 993 = used for IMAPS by Dovecot
- 22345 = used for SSH by Open SSH
Verify all ports listen globally on [::].
ss -6 -ltnpWhat this does:
- ss = socket statistics, displays port information
- -t = TCP sockets
- -u = UDP sockets
- -l = Listening sockets
- -p = Show process using the port
- -e = Extended info
- -n = Don’t resolve names (show numbers like port 25)
After changing configs, restart the services.
systemctl restart nginx postfix bind9 dovecotStep 3: DNS AAAA Records
Edit your zone file to add ipv6 records.
nano /etc/bind/zones/db.angelo-mouawad.sasm.uclllabs.beFile contents to add at the end of the file.
; AAAA records for IPv6
ns IN AAAA 2001:6a8:2880:a020::d4
@ IN AAAA 2001:6a8:2880:a020::d4Increment the serial by 1 and then reload Bind.
systemctl reload bind9Step 4: Ensure the lab specific Assignment works
In a new terminal open this SSH Connection.
ssh -p 29422 -D 8080 -C -N root@193.191.176.212Using a browser preferably Fire Fox:
- Open Settings and go to Network settings.
- Press configure how Fire Fox connects to the internet.
- Set the SOCKS Host to
127.0.0.1and the Port to8080. - Make sure SOCKS 5 is selected.
Now if you open the website go to The Assignment and it will tell you your special extra port. You must now ensure your server listens on IPv6 on port 29422.
Create a systemd socket unit.
nano /etc/systemd/system/lab29422.socketFile contents for /etc/systemd/system/lab29422.socket.
[Unit]
Description=Dummy IPv6 listener for SaSM IPv6 lab
[Socket]
ListenStream=[::]:29422
Accept=no
[Install]
WantedBy=sockets.targetCreate the matching service unit
nano /etc/systemd/system/lab29422.service[Unit]
Description=Stable IPv6 listener for SaSM port 29422
After=network-online.target
Wants=network-online.target
[Service]
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/socat TCP6-LISTEN:29422,bind=[2001:6a8:2880:a020::d4],fork,reuseaddr -
Restart=always
RestartSec=1
User=nobody
Group=nogroup
[Install]
WantedBy=multi-user.target
Enable and start the new socket.
systemctl daemon-reload
systemctl enable --now lab29422.socketVerify it is listening on ipv6.
ss -tulpen | grep 29422