如何从另一个IP连接到NAT后面的远程Tomcat服务器?
我想将空闲计算机用作在Ubuntu上运行的Tomcat服务器。
当前,空闲机在NAT后面,并且已经在路由器中设置了机器的外部端口(例如234)。在我的PC上,我通常使用SSH连接到机器,例如“ 1.2.3.4 -p 234”,并且可以在CMD中使用“ Telnet 1.2.3.4 234”的机器进行ping ping。但是,如何使用该机器上的端口8080连接到内部TOMCAT?
I want to use my idle machine as a tomcat server, which runs on Ubuntu.
Currently, the idle machine is behind a NAT, and the external port (say 234) to the machine has already been set in the router. On my PC, I usually connect to the machine using ssh like "1.2.3.4 -p 234", and I can ping the machine with "telnet 1.2.3.4 234" in CMD. But how can I furthur connect to the internal Tomcat with port 8080 on that machine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了,我端口向外部端口234至8080。现在,我可以看到Tomcat主页1.2.3.4:234。
但是新问题是,我不能再用“ SSH 1.2.3.4 -p 234”连接到机器本身,我可以完成这两个事情吗?
Problem solved, I port-forwarded external port 234 to 8080. Now I can see tomcat homepage with 1.2.3.4:234.
But the new problem is, I can no longer connect to the machine itself with "ssh 1.2.3.4 -p 234", can I get both things done?