Route to IP:PORT instead of interface - translate 10.20.30.40:443 -> 127.0.0.1:1443

24 Views Asked by At

I have (banyan) tunnel to some service, it is listening on 127.0.0.1:1443 But previously I had VPN and was able to connect directly to IP:PORT, like 10.20.30.40:443 The problem is, I need to be able to connect to 10.20.30.40:443 (the tool is not offering IP:PORT change). I was thinking about routing, but classic route add accepts only interface. What I need is translation 10.20.30.40:443 -> 127.0.0.1:1443 Since 10.* is a local address I need to create manual route to some interface. And something needs to listen on this interface and translate incoming IP:PORT to outgoing IP:PORT.

It is for Windows, but I guess in the worst case, I can install some light Linux distribution in VM with banyan and tunnel it through there.

I'm thinking about using badvpn-tun2socks, route to 10.* to badvpn TUN adapter. But I need some local socks server which will do the translation between input IP:PORT and output IP:PORT. Is there anything like that? Or is there any other approach? I tried

netsh interface portproxy add v4tov4 listenport=443 listenaddress=10.20.30.40 connectport=1443 connectaddress=127.0.0.1

But I cannot make it work. I tried to add route for 10.20.30.40 to local adapter, but didn't work. I is probably wrong approach anyway.

0

There are 0 best solutions below