简体   繁体   English

从移动设备访问URL时,netsh portforwarding不起作用

[英]netsh portforwarding not working while accessing url from mobile

Problem statement : I have an Oracle VM running on my windows machine. 问题陈述 :我的Windows计算机上运行着Oracle VM。 And the VM machine has an application running in jboss. VM机器有一个运行在jboss中的应用程序。 I want to access this application (running on VM) on my mobile. 我想在手机上访问此应用程序(在VM上运行)。

What I had tried : I tried port forwarding using below commands and it is working perfectly when I access this from Desktop browser(http://{hostmachineip or localhost}:9098 is connecting to jboss on VM). 我尝试过的操作 :我尝试使用以下命令进行端口转发,并且当我从桌面浏览器访问此端口时,它运行正常(http:// {hostmachineip或localhost}:9098正在连接到VM上的jboss)。 Now if I access this from my Mobile browser(connected to Desktop wifi hotspot and url-- http://hostmachineip:9098 ), it is not working. 现在,如果我从移动浏览器(连接到台式机wifi热点和URL- http:// hostmachineip:9098 )访问此文件,它将无法正常工作。

netsh interface portproxy add v4tov4 listenport=9098 connectaddress=<IP of VM>

netsh interface portproxy add v4tov4 listenport=9098 listenaddress=<IP of Host Machine> connectaddress=<IP of VM> connectport=9098

Oracle VM network settings: Oracle VM网络设置:

Attached to : Host-only Adapter 附加到:仅主机适配器

Promiscuous Mode: Deny 混杂模式:拒绝

I'm not supposed to change Adapter to Bridged Adapter as the IP for VM will change and it has a major impact in my existing project. 我不应该将Adapter更改为Bridged Adapter,因为VM的IP将会更改,这对我现有的项目有重大影响。

It is an issue with windows firewall. Windows防火墙有问题。 opened 9098 port and it started working. 打开9098端口,它开始工作。 Link describing steps to open port. 链接描述打开端口的步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM