K
K
Kudrin Sergey2015-04-28 04:39:57
Windows
Kudrin Sergey, 2015-04-28 04:39:57

How to redirect requests to external IP to localhost?

Good afternoon.
Initial data:
win 7, the Internet is configured through a router.
There is a software that sends requests to the external IP 10.20.30.40:4321
There is my mini proxy server on localhost that listens on port 1234
It is necessary to programmatically make sure that any requests from the software on the IP 10.20.30.40:4321 are redirected to 127.0.0.1: 1234
If the software accessed the domain, everything would be simple, it would be possible to do everything through hosts.
How to make such a route in Windows?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Gleb Bogdanov, 2015-04-28
@bogdanov_go

Firstly, this is not a route, but a redirect (redirect from port to port).
Secondly, it is not clear what goal you are pursuing. If you need to prevent a program from requesting a remote host, then simply close the outgoing request on port 4321 in the router. If you want the request to go through a proxy (why?), then do a redirect.
A redirect to a proxy is done using a firewall.

M
mureevms, 2015-04-29
@mureevms

Built-in means of Windows, most likely, no matter how.
To redirect, you need to look for a firewall with such functionality. It’s not a fact that you will find it, I don’t remember any of the free ones. Perhaps only some professional, such as kerio.
It seems to me that you have chosen the wrong platform. I advise you to raise a proxy (Squid) on a virtual Linux, everything is done much easier and there will be no need to reinvent the wheel. The redirection becomes generally in one command on a fusee. And you can turn traffic from anywhere and anywhere, regardless of the availability of a domain name.

T
ton1, 2015-04-29
@ton1

there are programs to force redirect traffic to proxies, they work locally
en.wikipedia.org/wiki/Comparison_of_proxifiers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question