Skip to content

Instantly share code, notes, and snippets.

@Graph-X
Created July 19, 2016 19:13

Revisions

  1. Graph-X created this gist Jul 19, 2016.
    19 changes: 19 additions & 0 deletions instructions.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #Pivotbox changes:
    openvpn --mktun --dev tun0
    ifconfig tun0 1.1.1.2 netmask 255.255.255.252 up
    #IP Forwarding and PermitTunnel yes only need to be done once
    echo 1 > /proc/sys/net/ipv4/ip_forward
    echo "PermitTunnel yes" >> /etc/ssh/sshd_config
    service sshd reload
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


    #local kali vm
    openvpn --mktun --dev tun0
    ifconfig tun0 1.1.1.1 netmask 255.255.255.252 up
    ssh -w 0:0 -fN user@linuxbox
    #hostFile is one IP per line you can get almost that by exporting the hosts from the msf database using hosts -c address -o /tmp/hostFile
    tr -d '"' /tmp/hostFile > hosts
    cat hosts | while read LINE; do
    route add -host $LINE dev tun0
    done