我有一个应用程序(服务器)侦听端口8080.我希望能够将端口80转发给它,以便命中http://localhost解析我的应用程序(在localhost:8080).
http://localhost
localhost:8080
这应该针对任何端口映射进行推广(例如80:8080=> P_src:P_target),并使用现代*nix机器(例如Ubuntu)的最佳实践.
80:8080
P_src:P_target
注意这都是在本地完成的,因此除了localhost之外,不需要接受来自任何人的连接.
iptables
iptables ×1