Subscribe

Automatically Enable Internet Sharing (or ICS) on Mac or Windows

Posted by Garth on Monday, November 2, 2009

 
Since I have the iPod Touch and don't have a functional wireless router/AP, I needed to set up wireless internet sharing on both my Mac side and Windows side.  Setting it up was easy, but getting either of them to enable it after reboot was difficult.  On the Mac side, it shows as enabled, but you have to toggle it (turn it off then on) for it to work.  On Windows it just doesn't connect until you tell it to.  After extensive googling I managed to find the solution for both, and present them here.

Mac (OSX 10.6)
Set up Internet Sharing on your Airport as you normally would.  Then open a Terminal session and type the following:

sudo sh -c 'echo killall InternetSharing >> /etc/rc.local'
sudo sh -c 'chmod +x /etc/rc.local'
When you reboot it works as it should.

Windows 7
Share your wired connection (or whatever your internet is connected to).  Then create an Ad-hoc wireless network.  Once that's done open a command prompt and type:
netsh wlan show profiles
This will show you a list of wireless profiles.  Remember the name of the one that's referring to your newly created Ad-hoc network (referred to hereafter as PROFILE).  Then create a shortcut on your desktop with the following command-line:
C:\Windows\System32\netsh.exe wlan connect name=PROFILE
Name it whatever you want, then move it to your All Users Startup folder (I was unable to create the shortcut directly in my All Users Startup for some reason, likely some sort of UAC restriction).  When you reboot it connects to the Ad-hoc network and your internet is shared.

Who'd have thunk that I'd be posting Mac tips on my blog.  Not I.

0 comments:

Subscribe to: Post Comments (Atom)