如何将外部IP请求重定向到localhost

时间:2019-11-10 15:53:53

标签: centos iptables

我在Centos 6上,我有iptables 我有一个在localhost:5000上运行的服务 我需要打开此服务到互联网

我尝试过 iptables -t nat -A PREROUTING -d [myip] -j DNAT --to-destination [localhost] 但系统输出错误,提示PREROUTING是错误的选项/标志

我希望能够在浏览器中转到myip:5000,并要求进入localhost:5000

谢谢您的帮助!

0 个答案:

没有答案
相关问题