在同一台机器上配置本地IP和公共IP [英] Configure Local IP and Public IP on Same Machine

查看:58
本文介绍了在同一台机器上配置本地IP和公共IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的webServer(IIS7.0)中,我已经配置了两个应用程序"X"和"Y".

我已经通过在同一台计算机上配置本地IP和公共IP来设置我的网络连接.
例如我的局域网属性"-> TCP/IP(属性)->高级->添加了我的公共IP(带有默认网关)

现在,我可以在同一网络上访问本地IP和公共IP,并且可以正常工作.
问题是,我无法通过公共IP从外部网络访问我的应用程序.

如果我仅配置公共IP (不使用本地IP),则它在本地网络和外部网络上都可以正常工作.

但是我需要在同一台计算机上配置本地IP(用于性能问题)和公共IP.我怎样才能做到这一点??
请帮帮我



In my webServer(IIS7.0), i have configured two APPLICATIONS ''X'' and ''Y''.

I have setup my Network Connections by Configure both Local IP and Public IP on the same machine.
like My LAN Properties-->TCP/IP (Properties)-->Advanced -->Added my Public IP (with Default Gateway)

Now I can access both Local IP and Public IP on the same Network and works fine.
Problem is, i cannot access my application from an External network through public IP.

If i configure Public IP alone(without local IP), its works fine on both local Network and External Network.

But i need both Local IP(for performance Issue) and Public IP Configured on same machine. How can i do that??
Please help me out

推荐答案

一种实现此目的的方法是在路由器上设置端口重定向.

例如,如果您希望能够从Internet使用远程桌面到计算机,则需要设置端口转发,例如;

One way to achieve this is to set up a port redirection on your router.

For example if you want to be able to use Remote desktop to your computer from the internet you would need to set up a port forwarding like;

Service Name: RDP [you can call this anything you want, it is just a name for the port table in the router]
Protocol: TCP
Wan IP: [public address here]
Public Port: 3389 [standard port used by RDP, or whatever you have configured it for]
Private IP: [private address here]
Private Port: 3389


这篇关于在同一台机器上配置本地IP和公共IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆