nicocha30 / ligolo-ng

An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.
GNU General Public License v3.0
2.61k stars 260 forks source link

Error dial tcp 127.0.0.1:port connected: connection refused #61

Closed scr4sh closed 5 months ago

scr4sh commented 6 months ago

Good morgning:

I am doing an HTB prolabs, and I have this problem when I try to do a double pivot, on both machines I have root/administrator permissions. I attach screenshots, I run it from Evil-winrm... in case it influences something... Captura desde 2024-02-26 12-20-23 Captura desde 2024-02-26 12-24-09 Captura desde 2024-02-26 12-22-46

nicocha30 commented 6 months ago

More details are needed here. Can you share some information? (Proxy Ports)

scr4sh commented 5 months ago

My problem comes because if on the local side (Proxy) I expect to receive connections on port 443: ./proxy -selfcert -laddr 0.0.0.0:443

Whenever you want to double pivot, you'll need to configure the listener as follows: listener_add --addr 0.0.0.0:12000 --to 127.0.0.1:443 --tcp

And not like this, like I did: listener_add --addr 0.0.0.0:12000 --to 127.0.0.1:13000 --tcp (the loopback port always has to match the listening port indicated in the proxy)

I didn't find anything in the documentation about it, or maybe I didn't understand it, still thank you very much for your attention, I had another "problem", with something different, I will open another thread so as not to confuse people, thank you, sorry for the inconvenience