sudo yum install epel-release elrepo-release
sudo yum install yum-plugin-elrepo
sudo yum install kmod-wireguard wireguard-tools
# 開啟內(nèi)核轉(zhuǎn)發(fā)功能
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sysctl -p
sudo iptables -t nat -A POSTROUTING -o em1 -j MASQUERADE
sudo iptables -t nat -D POSTROUTING -o em1 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 11.0.0.1/8 -o em1 -j SNAT --to 118.123.244.135