Add the following aliases to your .bash_profile:
alias socks_on="ssh -D 8666 -C -N -f -M -S ~/.socks.socket $USER@<your_office_gateway>; networksetup -setsocksfirewallproxystate Wi-Fi on;" alias socks_off="networksetup -setsocksfirewallproxystate Wi-Fi off; ssh -S ~/.socks.socket -O exit $USER@<your_office_gateway>;"
Later you can start your tunnel with command
socks_on
and stop it with
socks_off
😉
Follow me:![Follow us on Facebook Facebook](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/facebook.png)
![Follow me on Twitter twitter](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/twitter.png)
![feather](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/icon.png)
Share me:
![Share on Facebook Facebook](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/facebook.png)
![Share on Twitter twitter](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/twitter.png)
![Share on Reddit reddit](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/reddit.png)
![Share by email mail](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/64x64/mail.png)
![feather](https://measure9.varkel.net/wp-content/plugins/social-media-feather/synved-social/image/icon.png)