Created
July 19, 2016 19:13
Revisions
-
Graph-X created this gist
Jul 19, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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