美文网首页
wireguard 搭建

wireguard 搭建

作者: 魔童转世 | 来源:发表于2023-04-15 21:51 被阅读0次
    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
    

    相关文章

      网友评论

          本文标题:wireguard 搭建

          本文链接:https://www.haomeiwen.com/subject/swaxjdtx.html