Skip to content

Instantly share code, notes, and snippets.

@claydegruchy
Last active November 26, 2024 12:24
Show Gist options
  • Save claydegruchy/5b1c557919704f1193bb202c7b331604 to your computer and use it in GitHub Desktop.
Save claydegruchy/5b1c557919704f1193bb202c7b331604 to your computer and use it in GitHub Desktop.

playing games on a plane or without internet

why

all you have is a macbook and your friend has another machine, such as a steam deck, phone or computer. you want to play games. you're in the sky and can't get down from there for a while. what do you do?

what

what we want to do is make a wifi network from this mac for others to connect to

outline

this is for ventrua but you could use whatever probably. start here: https://support.apple.com/guide/mac-help/share-internet-connection-mac-network-users-mchlp1540/13.0/mac/13.0

the issue here is that you'll find that you cant host a network on mac if that network doesnt have some kind of activity. if you tried to host en4 (ethernet 4) for example it wont work as the mac thinks theres "nothing to host"

to address this, we need to make a virtual network that the mac can share that appears to have things happening on it.

steps

to do this use the following commands

sudo networksetup -createnetworkservice AdHoc lo0
sudo networksetup -setmanual AdHoc 192.168.1.88 255.255.255.255

this will create a network service where your mac has ip 192.168.1.88. this is what your friends will need to connect to when you host a game

now follow the steps listed in the link above, but TLDR:

  • go to settings>sharing
  • hit ⓘ on internet sharing
  • then set
    • Share your connect from to AdHoc
    • To computers using to wifi
  • then hit the toggle button on internet sharing and click start on the popup

cleanup (important!)

if you dont clean that shit up after you've used it, you'll have all sorts of weird internet issues on your mac forever.

first we remove the network we created

sudo networksetup -deletepppoeservice "AdHoc"

then you need to redefine some settings in your wifi. once youre back around "real" wifi:

  • connect to a wifi network
  • it'll probably work for 5 seconds then fail and put a ! on the wifi symbol
  • go to the wifi symbol>wifi settings
  • go to the (...) next to the network you're connected to > network settings
  • clock ok

that should fix it, as in it worked on my machine :DDDDD but i dont actually know why it had an issue and why that fixed it other than some vauge idea that it was overwriting something in the network services that did it so if you know let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment