Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function workremote -d "Set up the necessary remote tunnels"
- echo Setting up SOCKS Proxy
- sudo networksetup -setproxybypassdomains Wi-Fi 169.254/16 *.com *.org *.co
- sudo networksetup -setsocksfirewallproxy Wi-Fi 127.0.0.1 5000 off
- sudo networksetup -setsocksfirewallproxystate Wi-Fi on
- echo Tunneling to Work
- ssh -L 5222:hipchat.internal:5222 -L 5223:hipchat.internal:5223 remote_host -N -D 5000 &
- read -p 'set_color green; echo read; set_color normal; echo "enter to quit> "'
- echo Closing Tunnel
- kill -9 %ssh\ -L\ 5222:hipchat.internal:5222\ -L\ 5223:hipchat.internal:5223\ remote_host\ -N\ -D\ 5000\ \&
- echo Turning off SOCKS Proxy
- sudo networksetup -setsocksfirewallproxystate Wi-Fi off
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement