YingXi
V2EX  ›  互联网

关于 iptables 转发问题

  •  
  •   YingXi · Jun 11, 2019 · 2996 views
    This topic created in 2592 days ago, the information mentioned may be changed or developed.
    想用 iptables 做 1 对 1 NAT 但是配置过后无法连接,请各位 dalao 帮忙看看有什么错误鸭
    /proc/sys/net/ipv4/ip_forward 已修改
    网络环境:ens192 是内网网卡 ens224 是外网网卡
    172.16.91.1(转发机) 172.16.91.2(后端机)二层打通
    iptables -t nat -A PREROUTING -i ens224 -d 128.1.x.x -j DNAT --to-destination 172.16.91.2
    iptables -t nat -A POSTROUTING -o ens224 -s 172.16.91.2 -j SNAT --to-source 128.1.x.x
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4397 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:08 · PVG 08:08 · LAX 17:08 · JFK 20:08
    ♥ Do have faith in what you're doing.