I use Parallels Desktop mainly to make sure my websites work on IE. As the IP address of the virtual network devices installed by Parallels are assigned by a dedicated DHCP server also installed by Parallels, and the IP address of my laptop changes as I change locations, I use the following setup to be able to access my laptops webserver by name from Windows.
Switch the Parallels virtual machine to host-only networking.
Set up OS X Internet Sharing (in the Sharing System Preferences panel) to share the connection with the Parallels Host-Guest adapter.
Open ports 80, 443, and any other ports you use for your development server (i.e. 3000-30xx for Rails development with locomotive) in the OS X firewall by adding a new rule.
Assign static IP addresses (from an unused network range) to the Parallels Host-Guest adapter and the network interface in Windows (I used 192.168.123.1 and 192.168.123.2 with network mask 255.255.255.0).
Add this to C:\WINDOWS\system32\drivers\etc\hosts:
Now you can access your Macs's development server by entering yourcomputer as the URL in IE, no matter what IP addresses are assigned to your mac.
Optionally, you can even comment the lines that start the Parallels DHCP-NAT server in /Library -> StartupItems -> Parallels -> Parallels, as with this setup, you use neither DHCP nor Parallels' NAT (but OS X's own NAT is used).
I recently switched from Comcast's cable modem service to Verizon's FIOS -- I get about 3x the download and 4x the upload speeds, and I save about $10 a month. Overall, I've been thrilled with the switch, other than with the router that Verizon provided. It's an ActionTec, and it's got perhaps the worst web-based GUI for a router that I've ever seen. Setting up port forwarding, for instance, is a real pain.
Last weekend, I wanted to set up an externally-accessible web cam, but despite what seemed like the proper setup in the ActionTec, I had no luck. So I pulled the ActionTec and installed my original Linksys BEFSR-41. I entered the port forwarding info for the web cam, and it was online without any issues at all.
A couple days later, I noticed that my FIOS connection wasn't feeling quite so speedy -- I'm supposed to be able to get up to 15Mbps of download speed, but the SpeakEasy.net speed test was reporting only around 5Mbps. After some searching, I found the answer. Apparently, this is a limitation of the Linksys router I own -- my BEFSR-41 is an older "V2" model, and the WAN port is limited to (I don't fully understand this part) 10Mbps duplex, which means 5Mbps download speed. The newer V4 model of the BEFSR-41 has no such limitation. When I put the ActionTec back online, the speed tests returned to their normal values.
And while this was only an issue for a couple of days, it's actually a bit worse than that. For the last couple of years, I was on the Comcast "high speed" cable plan, which theoretically gave me 8Mbps download speeds, but I recall never getting anywhere near that ... and now I know why. Guess that was $6 a month that I didn't need to spend!
The moral of the story is that today's high-speed net connections may have outpaced your router's capabilities -- especially if, as with mine, it's an older model. Visit one of the speed test sites and make sure you're getting everything you're paying for. Compare your speeds when connected through your router and when you connect your Mac directly to the cable modem; they should be nearly identical.
One thing that frequently bothered me about OS X was the lack of any way to automatically mount Windows file shares. At home, my DHCP server assigns me an IP of 10.0.x.x, and I want to mount my home shares, which include access to my media library, personal documents, etc. I also didn't know if I'd be connecting to my network via wifi or ethernet, so I would ideally like to check both. Well, some quick googling didn't really find an adequate solution, so I cobbled together my own.
First, we'll write an AppleScript to actually mount the Samba share. Start by running the Script Editor, and writing:
mount volume "smb://username:password@server_ip/share_name"
Then, hit the Compile button. Assuming you got no errors, we're ready to save. Press File, Save As, and enter .mount as the filename (and make sure you are saving in your home directory). Choose Script as the file format, and then hit save. Now, we need a way to make this script run on boot/wakeup, if and only if we're on our home network. This requires an install of sleepwatcher, a great freeware utility.
Open the terminal, type nano -w ~/.wakeup and paste this text into the Terminal. As the script is written, it only mounts the volume if your computer's IP address's first two octets are 10.0.x.x. Feel free to modify to taste.
For those of you with EVDO cards and an Intel-powered Mac, you may be interested in reading this very detailed article over at EVDOinfo.com. It explains how to set up your Mac such that Parallels Desktop can use the EVDO connection to access the internet. There's also an associated forums thread with a few more notes.
I don't have an EVDO card yet, but I've bookmarked the page for future reference. If someone has one and can confirm the procedure, please post a comment.
If you're like me, and you have an OS X work laptop that you bring home, you sometimes frustratingly find that the laptop will refuse to wake up when you get home, or it'll take a long time to wake up -- presumably because it's trying to find network resources that your office has, but obviously your home does not.
I've found a workaround that seems to have eliminated this problem for me completely. First, if you don't already, you should have separate network locations for your home and work. In my case, I use my laptop on an ethernet connection at work. So my Work location has every network port except Built-in Ethernet disabled. At home, I use my laptop on my wireless network, so my Home location has every network port except AirPort disabled.
I've created a third location, called NULL, which has all network ports disabled. Before leaving the office every day, I switch my location to NULL (using the Location option in the Apple menu), unplug my ethernet cable, and put the machine to sleep. When I get home, I open my MacBook Pro's lid, and it snaps awake instantly. Then I switch my location to Home and connect to my wireless network.
Before I started doing this, I'd see the spinning beachballs for two minutes fairly consistently. Now, I haven't had any problems. I'm guessing it's because, when you switch locations and a network port gets disabled, the operating system can inform the underlying network subsystem that this port is no longer available due to user intervention -- so all the resources that were coming through that port are gone as well. So there's no need for the network subsystem to wait for a time-out period to see if those resources will reappear, since it knows they won't.
To create the NULL location, go to the Location -> Network Preferences entry in the Apple menu. Then, from the Location menu, select New Location. Name it NULL or whatever you'd like. Once it's been created, switch to it in the Location menu. Then go to the Show menu and select Network Port Configurations. Then just uncheck everything.
Once you're done, hit Apply Now. You should be set.
There are a a number of hints here providing ways to create *.inetloc-based shortcuts for remote connections via SSH (secure shell), but these don't really allow ssh://email@example.com addresses or alternate ports (a must if the SSH server is internet-facing). The following method enhances the previous suggestions, and in addition, allows quick start of a session or scp from Terminal itself. For instance, rather than typing ssh -p 222 firstname.lastname@example.org, you'll be able to type ssh web, or use the ssh:// hint to create a quick access icon in the Finder.
To start, open Terminal and type the following:
$ cd ~/.ssh
$ nano -w config
You will have a blank file where you can create a three- or four-line shortcut entry for each host in the form of:
Press Control-X then Y to save. Obviously, replace the relevant bits above with the information specific to your SSH connections. The port line is optional, for those servers not on port 22.
Now to test. In Terminal, type ssh web (or whatever you named it), and ssh should start, switch you to the alternate user and port, and place you at the login. Now you can follow the other hints -- start Text Edit and write ssh://web. Highlight this and drag it to your Desktop or a folder. Now clicking this shortcut will start Terminal with an ssh session using your pre-configured host, login name, and port information.
I often have to do router configuration via a console port, so I use a Keyspan Serial Adapter to get access. Two problems then present themselves:
ZTerm is a horrible Mac OS X app. It hasn't been updated in five years or so, and isn't a Universal Binary. The developer doesn't seem in any hurry to rectify the situation. It is not worth the shareware fee in its current form.
Minicom requires installation of Fink or MacPorts and is overly complex.
Solution: Use screen, Terminal, and a little AppleScripting.
Looking through various hints (like this one, or on the icecast mailing list) about making your own streaming station with iTunes, I wanted something relatively simple. I just wanted to route all sounds coming from my Mac to a UNIX system (Solaris, in my case), and something like icecast was far more powerful than what I needed. I decided to make it UNIX way with maximum offload of a task to my Solaris box.
Preparation for solution is quite simple:
Get and install Soundflower -– this is the key component that'll allow routing of all sounds elsewhere.
Either from Fink or with DarwinPorts (now known as MacPorts) install EsounD package (we'll need the only esdrec utility from there, in fact)
On UNIX box prepare: netcat, lame, and any MP3 player (I use mplayer).
To actually stream do the following:
Use Soundflower (2ch) as default input and output device on the Mac.
On UNIX box, start the following: nc -l -p 2048 | lame -b 128 - - | mplayer -nocache - (change 2048 to any other port you want to use; -nocache was added to mplayer startup because on a Solaris box I have caching turned on by default). This will order netcat to listen on given port then pipe data through the MP3 encoder to a MP3 player.
On OS X type in Terminal: esdrec | nc hostname 2048 (modify hostname to match yours, same goes for port).
This idea is far more simple and gives a degree of possibility to put encoding where you want, but is less useful when you want to stream to several hosts at once (something you can do with icecast). If you prefer a more OS X-styled solution, you can play with MuSE and icecast, but the major drawback of such solutions is caching of stream everywhere so that sound will be delayed for several seconds.
If, like me, you use Parallels Desktop a lot on for-pay access points, or otherwise locked-down networks, where adding an additional MAC address to the same wireless card might cause problems, then this hint is for you.
A sign that you're having an issue is that you get the T-mobile authentication page, or none of the networks inside your Parallels virtual machines seem to work. You'll also note that the systems seem to be on the same subnet, e.g. 10.254.x.x.
The solution that I've found works is to go into Parallels' network configuration section, and tell it to bind to en0. Then go into the Sharing pane in OS X's System Preferences and tell it to share from AirPort to Ethernet. This has the effect of setting up NAT to your en0 interface, and Parallels hooks into that to get internet access. Since everything is masqueraded through your airport (en1) interface, it magically works.
Here's my setup: on my ethernet LAN, I have my mini, my Xbox, and a Windows PC; on my wifi LAN, I have my mini, my internet router, and two other Macs. So I was looking for something that I would install on my mini so that my router would be accessible to my Xbox and Windows PC, and that would allow me to connect to those two from any Mac. Basically, I needed to bridge my ethernet and wifi LAN using Mac OS X.
Use an Airport Express. Easy (simply configure the ethernet port with a static IP and disable all other features to have it bridge ethernet/wifi traffic), but not that cheap...
Use IPNetRouterX. It looked easy to use, but I didn't really like the idea of forking over US$100 for a proprietary piece of software.
Find some way to configure Mac OS X built-in ipfw/natd to do it.
I searched the web here and there, and nobody seemed to have done something similar.