V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
YingXi
V2EX  ›  互联网

关于 iptables 转发问题

  •  
  •   YingXi · Jun 11, 2019 · 2873 views
    This topic created in 2523 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   ·   960 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 21:15 · PVG 05:15 · LAX 14:15 · JFK 17:15
    ♥ Do have faith in what you're doing.