If i exploit with metasploit using openvpn ip of htb vpn and set the port to any number would it work?
And if not … how to exploit on htn without port forwarding or static ip
I tried using ngrok but metasploit sets the listener ip for the exploit automatically
I’m not sure what you mean by “OpenVPN IP of HTB”, but every machine and challenge has its own IP within HTB network and once connected to it through OpenVPN, you just have to use that IP and network magic happens (that is, according to the format of the IP you use, your network device will know where to send the packets).
So, within Metasploit, you would set RHOSTS to, let’s say 10.10.10.235, which is the IP adress of one of the machines. When LHOST is needed, I usually set it to tun0 (the name of the OpenVPN interface by default I believe) to avoid ambiguity.
[I usually set it to tun0 (the name of the OpenVPN interface by default I believe) to avoid ambiguity.]
thank you so much it worked … i didnt know that vpn ip has its own interface
Type your comment> @dragonista said:
I’m not sure what you mean by “OpenVPN IP of HTB”, but every machine and challenge has its own IP within HTB network and once connected to it through OpenVPN, you just have to use that IP and network magic happens (that is, according to the format of the IP you use, your network device will know where to send the packets).
So, within Metasploit, you would set RHOSTS to, let’s say 10.10.10.235, which is the IP adress of one of the machines. When LHOST is needed, I usually set it to tun0 (the name of the OpenVPN interface by default I believe) to avoid ambiguity.