[solved]Metasploit exploits can't bind to my ip

Everytime I try a metasploit exploit, it can’t seem to connect to my listener.

I have confimed I’m connected to HTB’s vpn. If I surf the tareget site using firefox, wireshark shows the IPs I’m using (mine and the targets) are correct.

When I run the exploit, I get this message:

-] Handler failed to bind to -
[-] Handler failed to bind to -
[-] - Exploit failed [bad-config]: Rex::BindFailed The address is already in use or unavailable: (
[*] Exploit completed, but no session was created.

strange, change the port by the warning it seems that there is already another process listening on port 4444

I figured it out. I didn’t realize I didn’t need to manually setup a listener when using metasploit exploits. My netcat listener was the conflict.

you are probably setting up your rhosts to the IP address of the machine you want to exploit, in addition, you will need to setup lhost to the IP address of the vpn gatway (you can find this on HTB portal where it shows you are connected to the VPN