Answer the question
In order to leave comments, you need to log in
How to redirect requests from localhost to another IP in win10?
There is an ubuntu server on the local network, a project is running on this server that listens on port 3000 and gives the site to localhost: 3000, this site requests files already on localhost: 4000. There is no access to the code on the server(!)
Through ssh with windows10 from LAN I can connect to this ubuntu server and site at 192.168.1.25:3000. But a browser opened at 192.168.1.25:3000 from win10 making a request to localhost:4000 will no longer reach the server.
you can't change the localhost address in the hosts file C:\Windows\System32\drivers\etc,
maybe you can redirect all requests to localhost:4000 to 192.168.1.25:4000 using windows10?
Answer the question
In order to leave comments, you need to log in
Try
netsh interface portproxy add v4tov4 listenport=4000 connectaddress=192.168.1.25 connectport=4000
from this question Windows Port ForwardingNote that this unfortunately only works for TCP, so if you want to redirect some UDP traffic, you're out of luck.
can windows10 redirect all requests to localhost:4000 to 192.168.1.25:4000?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question