sudo yum install epel-release elrepo-release
sudo yum install yum-plugin-elrepo
sudo yum install kmod-wireguard wireguard-tools
# 开启内核转发功能
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
网友评论