0

Possible Duplicate:
Forward Incoming Traffic with Windows hosts file?

In Windows you can redirect traffic from a host by using the hosts file.

C:\Windows\System32\drivers\etc\hosts

example

127.0.0.1 cp97384.edgefcs.net

Is there a way to do this with all traffic from a port? Something like

127.0.0.1 :1935

I have seen on linux you can do this with iptables. I have heard of solutions for Windows XP but nothing for Windows 7.

The solution does not necessarily have to use the hosts file, as I am pretty sure that is not even possible.

Listen on ipv4:             Connect to ipv4:

Address         Port        Address         Port
--------------- ----------  --------------- ----------
127.0.0.1       1935        64.210.72.117   1935
1
  • Just to clarify, are you trying to redirect traffic coming FROM this windows machines or TO this windows machine? I am trying to understand what you are trying to accomplish.
    – MikeAWood
    May 22, 2012 at 1:30

1 Answer 1

1

You may be able to do this with netsh interface portproxy command, read here for more info: http://technet.microsoft.com/en-us/library/cc776297%28WS.10%29.aspx

netsh interface portproxy add v4tov4 listenport=1935 listenaddress=127.0.0.1 connectport=1935 connectaddress=[ip of hostname]

Never used it before but seems to be applicable here.

2
  • Even if I include the hostname, this command does not work.
    – Zombo
    May 19, 2012 at 23:31
  • Can you post your output from "netsh interface portproxy show v4tov4" ?
    – floyd
    Jun 2, 2012 at 16:12

Not the answer you're looking for? Browse other questions tagged .