Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #First argument defines last IP octet for 2nd and 3rd commands.
  2. #Second argument defines an additional subnet you want to proxy for the last sshuttle connection.
  3. crazystuffhere(){
  4. echo -n Password:
  5. read -s something
  6. echo "Connecting to 1st Jumpbox 192.168.5.50 and proxying IP 192.168.10.50 through it."
  7. osascript -e "tell app \"Terminal\"
  8. do script \"sshuttle -r 192.168.5.50 192.168.10.50\"
  9. delay 2
  10. end tell"
  11. echo "Connecting to 2nd Jumpbox 192.168.10.50 and proxying IP 192.168.20.$1 through it."
  12. osascript -e "tell app \"Terminal\"
  13. do script \"sshuttle -r username@192.168.10.50 192.168.20.$1\"
  14. delay 2
  15. do script \"$something\" in window 1
  16. end tell"
  17. echo "Waiting 5 Seconds"
  18. Sleep 5
  19. echo "Connecting to 3rd Jumpbox 192.168.20.$1 and proxying IP subnet 192.168.50.0/24 and $2 through it."
  20. osascript -e "tell app \"Terminal\"
  21. do script \"sshuttle -r username@192.168.20.$1 192.168.50.0/24 $2\"
  22. delay 2
  23. do script \"$something\" in window 1
  24. end tell"
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement