The cursed river that helps your IPv4-only clients exit the underworld to the IPv6-only future
- You setup
styxas a CLAT (client-side translator), to provide native IPV4 support for your legacy clients in an IPv6 world styxprovides DNS services to clients over IPv4, and also launchestaygato provide v4->v6 packet translation- When the client requests an A record, and an AAAA record is available,
styxpulls an unused IPv4 out of the translation pool (Default pool is10.0.0.0/8, but you can use any IPv4 CIDR range) and returns this address to the client - At the same time, a new mapping is added in
taygawhich maps this new IPv4 to the result IPv6 address - Example: you browse to
google.com(returns AAAA2a00:1450:4026:801::200e).styxreturns10.0.0.1to the client, then addsmap 10.0.0.1 2a200:1450:4026:801::200etotayga. - This mapping session persists indefinitely, and will be re-used if any subsequent DNS queries result in IPv6 address
2a00:1450:4026:801::200e - Currently these entries never time out, maybe I should fix that
You need the latest main of tayga as well as this repository.
Instructions on Debian (you may need sudo, idk):
#install dependencies
apt install git golang-go build-essential
#make + install tayga
git clone https://github.com/apalrd/tayga
cd tayga
make
make install
#make + install styx
cd ..
git clone https://github.com/apalrd/styx46
cd styx46
make
#copy config example to running config
cp styx.yaml.example styx.yaml
#edit the config for your setup
#run it
./styxstyx assumes that IPv6 connectivity is already working, possibly including nat64 (default prefix is 64:ff9b::/96). nat64 is not strictly needed if all of your desired services support IPv6 already. You must have an IPv6 default gateway and must not have an IPv4 default gateway (styx will become the local gateway). styx will enable IP forwarding, and proxy ND for each of the addresses behind the CLAT. This may disable accept_ra depending on your distribution, in which case you may need to re-enable it: echo "2" > /proc/sys/net/ipv6/conf/eth0/accept_ra (if your upstream connectivity is via eth0).