本案例环境,centos 7.4 代理服务器 内网IP 192.168.3.69

  1. 关闭网卡的原目的检查 控制台>弹性云服务器>网卡
    iptables实现华为云服务器无公网IP上网
    2 在虚拟私有云控制台 ,添加路由 ,指定代理服务器私有IP为下一跳地址
    iptables实现华为云服务器无公网IP上网
    3确保代理服务器能上网iptables实现华为云服务器无公网IP上网
    4 开启代理服务器IP转发功能

echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
sysctl -p 使上面配置生效
cat /proc/sys/net/ipv4/ip_forward 输出1 证明已生效
5 ,配置iptables 转发
iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -j SNAT --to 192.168.3.69
6新购买的同vpc的服务器可以上网
iptables实现华为云服务器无公网IP上网

相关文章:

  • 2021-12-14
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2021-04-25
  • 2021-11-08
  • 2021-12-02
猜你喜欢
  • 2021-11-29
  • 2021-07-10
  • 2021-07-15
  • 2021-11-28
  • 2022-01-21
  • 2021-12-20
  • 2021-11-27
相关资源
相似解决方案