Ubuntu部署tayga实现NAT64

Ubuntu部署tayga实现NAT64

tayga安装
apt update && apt install tayga -y
设置ipv4和ipv6转发

配置sysctl.conf

net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1

随后启动转发

sudo sysctl -p
配置/etc/tayga.conf
tun-device nat64
ipv4-addr 192.168.254.1
prefix fd00:1234:5678::/96
dynamic-pool 192.168.254.0/24
data-dir /var/spool/tayga
启动tayga
sudo systemctl enable tayga
sudo systemctl start tayga
sudo systemctl status tayga
设置iptables路由机制
sudo iptables -t nat -A POSTROUTING -o enp3s0 -j MASQUERADE
sudo ip6tables -t nat -A POSTROUTING -o enp3s0 -j MASQUERADE
重启tayga
sudo systemctl restart tayga

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注