iptables怎样将内网 192.168.0.0/24 的原地址修改为公网IP地址:1.1.1.1。

[root@xuegod63 ~]# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT –to 1.1.1.1 把从 eth0进来的要访问 TCP/80 的数据包目的地址改为 192.168.0.1. [root@xuegod63 ~]# iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j DNAT –to 192.168.0.1


更多内容

linux100问

python100问

网络基础知识100问