I have a problem with exploiting machine outside my LAN network. I tried answers from StackExchange but they didn't work for me.
My setup of exploit: ms17_010_eternalblue
RHOST = target ip and RPORT = target port
I set the payload
LHOST = my PUBLIC ip and LPORT = my forwarded port on router.
I check the port and my external ip on canyouseeme.org and it shows that port is open.
When exploit starts it says:
[-] Handler failed to bind to XXX.XXX.XXX.XXX:4444:- -my external ip
On other sites it says that i must set payload lhost to external ip but then this error shows. Please provide command by command answer because I don't have any ideas what to do. I know that handler must be set to my internal ip because it is listening for connections, but on the other side, the target must have my external ip to connect back to me.