内网映射*

1.启用网关服务器路由转发功能
[root@localhost~]# vi /etc/sysctl.conf
net.ipv4.ip_forward=1

[root@localhost~]# sysctl -p

2.为局域网访问Internet 的数据包采用SNAT策略,将源地址更改为服务器的公网IP地址
[root@localhost~]# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j SNAT --to-source 公网IP
(eth0 这个我不知道你配得哪个口 自己改)

未测试。。。
原文地址:https://www.cnblogs.com/flyoung/p/5980839.html