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