Last active 1726244211

Revision 6760a7076db7762c1017fdfdccd1fc1d1dd310b4

ipv6privateloopback.sh Raw
1#!/bin/sh
2# Asuming you want to make a random private /120 prefix in IPv6 and have all of those addresses assigned to the loopback interface (dev lo), and you're root, and have https://gitlab.com/ipcalc/ipcalc installed, run:
3eval "$(ipcalc -r 120 -np)"
4netpref="${NETWORK}/${PREFIX}"
5ip addr add "$netpref" dev lo scope host
6ip route add local "$netpref" dev lo
7