Resume and bio of the author Couple of articles related to my hobby - robotics
My impressions about immigration to Australia. In Russian only. Recipes for everyday problems solving
Linux-related posts Windows-related posts
Software-related posts A lot of info about hardware
Different tools you might find useful Posts about various web technologies
Everything that doesn't fit the rest of the menu RSS feed for this blog

Tag Cloud



Andrey Mikhalchuk’s Blog

Technoblog about life

Apr 3, 2013 How to Map Ports in Windows

Port mapping is a great feature that allows you to make almost any remote network service to work like it is running on your computer. Most people use specialized software to make it work, however there is a built-it Windows command that allows you to do exactly the same thing. Fire up windows command shell (Start->Run->cmd) and run this command:

netsh interface portproxy add v4tov4 listenport=8888 connectport=80 connectaddress= protocol=tcp

Now start web browser and go to this URL: http://localhost:8888/. Note that the web browser is pointer to your own computer yet it displays a page from my website.

Another example where you can use this utility is to expose a server that binds to loopback to the LAN. From my recent experience Webrick when started in Rubymine and Oracle Policy Modeller do that. If you want to access services exposed by these programs you can map a port on your loopback interface ( to your LAN interface. There are ways to configure both Webrick and OPM to bind to the LAN interface, but using netsh seems to be an easier way.

If you’re running Windows XP there is one catch though. You need to install IPv6 (Run->Settings->Control Panel->Network Connections->Local Area Connection->Properties->Install->Protocol->Microsoft TCP/IP version 6), otherwise this feature won’t work. It’s a known bug in netsh and it doesn’t look like Microsoft is going to fix it.

Google for netsh and you will find more cool features this utility is packed with.

This post is published in Windows.

No comments

No comments so far

Leave a Reply

You must be logged in to post a comment.

Site Map (c) Andrey Mikhalchuk, 2005-2008