29 lines
536 B
Bash
29 lines
536 B
Bash
#!/bin/sh
|
|
|
|
sudo /etc/init.d/tayga stop
|
|
|
|
cat <<EOF | sudo tee /etc/tayga.conf
|
|
tun-device nat64
|
|
ipv4-addr 10.0.1.1
|
|
prefix 2001:db8:23::/96
|
|
data-dir /var/spool/tayga
|
|
map 10.0.1.42 2001:db8:42::42
|
|
EOF
|
|
|
|
cat <<EOF | sudo tee /etc/default/tayga
|
|
RUN="yes"
|
|
CONFIGURE_IFACE="yes"
|
|
CONFIGURE_NAT44="no"
|
|
DAEMON_OPTS=""
|
|
IPV4_TUN_ADDR="10.0.1.1/24"
|
|
IPV6_TUN_ADDR="2001:db8:23::1/96"
|
|
EOF
|
|
|
|
sudo /etc/init.d/tayga start
|
|
|
|
|
|
sudo ip addr add 2001:db8:42::77/64 dev eth2
|
|
sudo ip link set eth2 up
|
|
|
|
sudo ip addr add 10.0.0.77/24 dev eth1
|
|
sudo ip l s eth1 up
|