Skip to content

Instantly share code, notes, and snippets.

@richstokes
Last active June 24, 2024 10:25
Show Gist options
  • Save richstokes/25b20d9c83b958868726d14593ddd56f to your computer and use it in GitHub Desktop.
Save richstokes/25b20d9c83b958868726d14593ddd56f to your computer and use it in GitHub Desktop.
iPhone hotspot

Get emergency internet access on your Mac via your iPhone if you don't have a hotspot-enabled plan.

   

  1. Download iSH App: https://ish.app/, once opened set up the ssh server with:
adduser rich
apk add openssh nano
ssh-keygen -A
nano /etc/ssh/sshd_config -- Set: AllowTcpForwarding yes 
/usr/sbin/sshd -d (Runs in debug mode)
/usr/sbin/sshd (Run as daemon / in background mode)
  1. On your Mac create an Adhoc WiFi network

  2. Join iPhone to this new Adhoc WiFi network, and make a note of the IP address your phone gets (169.254.x.x)

  3. On your Mac, open a terminal and connect to the SSH server running on the iphone with ssh -D 1234 rich@169.254.6.238

  4. Optionally Test/Verify with: curl --socks5-hostname 127.0.0.1:1234 ifconfig.co/json

  5. Configure Firefox Network Settings:

  • Set SOCKS5 Host to 127.0.0.1:1234 / SOCKS v5.
  • Tick "Proxy DNS when using SOCKS5 box"
  1. Optionally install https://www.proxifier.com to send all traffic down proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment