To configure a Debian 13 server to use a computer's IPv6 address, you need to ensure that:
Here’s a step-by-step guide to achieve this:
Run the following command on the computer to find its IPv6 address:
baship -6 addr show
Look for an IPv6 address (e.g., 2001:db8::1 or similar). Note it down.
Ensure IPv6 is enabled on the server by checking:
bashcat /proc/sys/net/ipv6/conf/all/disable_ipv6
If the output is 0, IPv6 is enabled. If it’s 1, disable the setting:
bashsudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
To make this permanent, add these lines to /etc/sysctl.conf:
plaintextnet.ipv6.conf.all.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0
Then apply:
bashsudo sysctl -p
/etc/apache2/sites-available/000-default.conf) and add:
apacheListen [computer's IPv6]:80 <VirtualHost [computer's IPv6]:80> ServerName yourdomain.com # Other configurations... </VirtualHost>
/etc/nginx/sites-available/default:
nginxserver { listen [computer's IPv6]:80; server_name yourdomain.com; # Other configurations... }
Restart the service:
bashsudo systemctl restart apache2 # For Apache sudo systemctl restart nginx # For Nginx
Edit /etc/ssh/sshd_config and add:
plaintextListenAddress [computer's IPv6]
Restart SSH:
bashsudo systemctl restart ssh
Ensure your application is configured to bind to the computer's IPv6 address (e.g., in a config file or command-line argument).
If you use ufw or iptables, allow IPv6 traffic:
bashsudo ufw allow from [computer's IPv6] to any port 80 proto tcp
bashsudo ip6tables -A INPUT -p tcp --dport 80 -s [computer's IPv6] -j ACCEPT
From the computer, test if the server is reachable via IPv6:
bashping6 [server's IPv6] curl http://[server's IPv6] # For web servers ssh user@[server's IPv6] # For SSH
Ensure the computer and server are on the same IPv6 subnet or that routing is correctly configured. If they are on different networks, ensure IPv6 routing is set up properly.
/var/log/apache2/error.log or /var/log/nginx/error.log).tcpdump to monitor IPv6 traffic:
bashsudo tcpdump -i eth0 ip6
[computer's IPv6] and [server's IPv6] with the actual addresses.Vibe can make mistakes. Check answers. Learn more