Home  >  Q&A  >  body text

centos - iptables 设置问题

两机器
a, 无公网, 内外 ip 如 10.0.0.1
b, 公网 ip 如 111.111.111.11, 内外ip 10.0.0.2

能否实现机器a访问公网的web服务(主要是一些其他公网的api), 通过机器b访问?
在不影响b原来的公网访问基础上.

新手, 不知道怎么描述, 是否是iptables的转发可以做到?

谢谢

習慣沉默習慣沉默2734 days ago752

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-04-25 09:03:19

    There are two ways to achieve this:
    1. Use rinetd port forwarding tool on b
    2. Use the NAT function of iptables on b. You can check the usage by yourself

    reply
    0
  • Cancelreply