On Debian 13, changing the external IPv6 address typically involves configuring your network interface or router, depending on whether the IPv6 address is assigned by your ISP (Internet Service Provider) or statically configured. Here’s how you can approach it:
First, verify your current IPv6 address and network interface:
baship -6 addr show
or
bashifconfig -a | grep inet6
Look for the interface connected to the external network (e.g., eth0, ens33, or enp0s3).
Dynamic (SLAAC or DHCPv6): If your ISP assigns IPv6 dynamically (common for home connections), you cannot manually set the external IPv6 address—it is managed by your ISP or router.
Static IPv6: If you have a static IPv6 block (common for servers or business connections), you can manually configure it.
If you have a static IPv6 address, edit your network interface configuration.
netplan (Debian 13 default)Debian 13 uses netplan for network configuration. Edit the relevant YAML file in /etc/netplan/ (e.g., 01-netcfg.yaml):
yamlnetwork: version: 2 renderer: networkd ethernets: ens33: # Replace with your interface name dhcp6: no addresses: - "2001:db8::1/64" # Replace with your static IPv6 address gateway6: "2001:db8::ffff" # Replace with your IPv6 gateway nameservers: addresses: - "2001:4860:4860::8888" # Example: Google DNS - "2001:4860:4860::8844"
Apply the changes:
bashsudo netplan apply
ifconfig (Legacy)If using ifconfig, add the IPv6 address temporarily:
bashsudo ip -6 addr add 2001:db8::1/64 dev ens33
To make it persistent, add the command to /etc/rc.local or use a network manager like systemd-networkd.
If your Debian machine is behind a router:
Check if the new IPv6 address is active:
baship -6 addr show
Test connectivity:
bashping6 ipv6.google.com
ufw or iptables, ensure IPv6 traffic is allowed:
bashsudo ufw allow in on ens33 to any
bashsudo systemctl restart systemd-networkd
Vibe can make mistakes. Check answers. Learn more