本文最后更新于 2858 天前,文中所描述的信息可能已发生改变

经常忘记这个记一下

bash
1
2
3
4
5
6
7
8

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

// -s 来源地址
// -o 输出网口
// -j 转换地址

iptables -t nat -L //查看nat 表