
1 bg7lgb 2022 年 3 月 4 日 去掉 MASQUERADE 规则 ,只保留两条 DNAT 试试 |
2 bearice 2022 年 3 月 4 日 默认路由的问题,用策略路由指定 eth1 的 IP 走另一个路由表就行了 ip rule add from 3.112.105.71 lookup 100 ip route add default gw 172.31.0.1 dev eth1 table 100 |
3 360750581 2022 年 3 月 4 日 为啥一定要用 iptables ,换个思路,nginx 反代不是完美实现 |
4 aboutboy OP @bearice 感觉你这个方法是正确的思路。 不过我在执行 ip route add default gw 172.31.0.1 dev eth1 table 100 时,提示错误: Error: either "to" is duplicate, or "gw" is a garbage. 现在还是不能实现两张网卡同时 nat |