Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Easily disable network connections when necessary Network
There may be times you want to temporarily turn off your Internet connection: for example (long reason short), some HTML-based spam messages can be used to verify your e-mail address just by viewing the images contained therein.

If you're using AirPort, the answer is simple: turn off the AirPort connection, which is normally what I do. However, with my G4 tower at work, which uses a wired ethernet connection, I couldn't do that.

So, what you can do instead is to create a new network location (I called mine "No Access") and enter in bad or garbled information. Or, in my case where at work I have a static IP, I made the new location try to use DHCP (which would fail). Then, when you want to turn off your network connection, just go to the Apple menu, Locations menu, and select No Access, and you're kicked offline until you want to go back.
    •    
  • Currently 1.60 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[43,693 views]  

Easily disable network connections when necessary | 18 comments | Create New Account
Click here to return to the 'Easily disable network connections when necessary' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily disable network connections when necessary
Authored by: CaptCosmic on Jun 17, '03 10:25:31AM
On my iBook, since there are times when I'm using it wth no network access, I have created a location called Networkless. This location simply has all of the network interfaces disabled, ethernet, modem, and Airport. With them all disabled, there is no IP address, and no place for connections to go.

---
Capt Cosmic

[ Reply to This | # ]

Easily disable network connections when necessary
Authored by: anandman on Jun 18, '03 01:38:40AM

Turning off all the networking interfaces also increases battery life noticably. I have a "Powered Off" location that has no interfaces that I use whenever I'm not at a place where I can get Internet access, including, and especially, on an airplane.



[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: cybergoober on Jun 17, '03 10:35:23AM

I've done something similar, only I named mine "Working Without A 'Net"



[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: osxpounder on Jun 17, '03 10:47:24AM

Really? Hmm. I just created a new Location, gave it a manual IP address of all zeros, and told it to use the dialup modem [which isn't even connected, since I work in a bldg w/Ethernet].

I applied the new location--twice, once from the Prefs panel and, after closing that, from the Apple menu--but I am still able to surf this web page, post this message, and use iChat. There must be something more to it than that. Are you sure you're actually disconnected from the network?

---
--
osxpounder



[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: hamtoolie on Jun 17, '03 10:58:47AM

My guess is that you switched over to dialup without turning off ethernet. OS X supports multiple network interfaces at one time. By switching to dialup, you probably left ethernet as active as well. So you'd still have a valid ethernet connection and a dialup connection with nowhere to go.

To turn ethernet off, go to your Network pane in System Preferences and in the drop down menu where it shows "builtin ethernet" or "internal modem" it should also say "Network Port Configurations". Through that, just click the ethernet checkbox off. Save that as your no connection location.



[ Reply to This | # ]
in reply to osxpounder
Authored by: hamtoolie on Jun 17, '03 11:00:32AM

This message was supposed to be in reply to osxpounder's comment.



[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: osxpounder on Jun 17, '03 03:07:21PM
Thanks. I was realizing that while you were posting, I think. You're right. I posted two images on the web to show what needed to happen: I need to make sure my new location is set up using the Ethernet connection [not the modem], and I also need to tell the Mac not to get its IP address the usual way [DHCP in my case]. Screenshots:

Choose the right connection to affect
Prevent the Mac from getting a proper IP address

---
--
osxpounder

[ Reply to This | # ]

Easily disable network connections when necessary
Authored by: TvE on Jun 17, '03 11:28:08AM
If it's ONLY Mail.app and SPAM that you're trying to avoid - then why not make a little AppleScript that toggles Mail.app's preference to temporary notDisplay images and embedded objects in HTML messages?

[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: rottenchops on Jun 17, '03 11:33:55AM

What about just issuing:
sudo ifconfig en0 down



[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: mbartosh on Jun 17, '03 05:56:56PM
ifconfig doesn't jive with configd, Mac OS X's network configuration database. use:

sudo ipconfig set en0 NONE
sudo ipconfig set en0 DHCP

...supposing you're taling about en0. ifconfig might work, but it might also have unforseen circumstances.

---
4am Media, Inc. Mac OS X Training and Consulting

[ Reply to This | # ]

Easily disable network connections when necessary
Authored by: foobar104 on Jun 17, '03 01:29:55PM

This is not a good hint.

It's never a good idea to deliberately enter invalid information into a system preference pane. That's just asking for trouble. Instead, you should simply disable your network interfaces. Here's a step-by-step procedure.

1. Open System Preferences and bring up the Network pane.

2. If you want, create a new location for easy toggling.

3. On the "Show" popup, select Network Port Configurations.

4. Uncheck everything.

5. Click "Apply Now."

At this point, you will have no networking. To re-enable networking, return to the Network Port Configurations interface and check the network connections you wish to enable. Or use the Location menu.



[ Reply to This | # ]
Uhh, ok...
Authored by: Anonymous on Jun 17, '03 03:19:35PM

But why not just turn off image viewing in your mail client? Or better yet, find a mail client that gives you the option of always displaying plain text? Very seldom do I get legitimate mail in html, and when I do it's easy enough with PowerMail to click the button loading it into Safari. Meanwhile it never loads images in mail unless I ask it too, and Mail.app has the same function minus the plaintext display. Seems like an awful lot of trouble to work around a poorly designed or configured mail client.

---
Regards,

Ed Hintz



[ Reply to This | # ]
Uhh, ok...
Authored by: vonleigh on Jun 17, '03 03:39:14PM

I agree, I always have html disabled in mail.app. What I don't like is that I haven't found an easy way of re-enabling it for a specific message for that once in a lifetime legitimate html email.

I wish it had a contextual menu, instead of me having to dig through the prefs, enable it for all, read message, then disable again. I guess I'll have to come up (see if it's possible) with an applescript like another commenter suggested.



[ Reply to This | # ]
Hint
Authored by: filburt1 on Jun 17, '03 06:18:13PM

I never said that I was using Mail.app (although I am ;)). It's more of a generic hint. And yes, probably disabling all connections would be cleaner but this works too.



[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: brettdog on Jun 17, '03 06:30:58PM
An earlier hint shows an applescript to temporarily turn on HTML for reading an email message. See this hint .

---
brettdog

[ Reply to This | # ]

Easily disable network connections when necessary
Authored by: nathanst on Jun 17, '03 06:36:22PM

Ummm....

The answer is already on this very site.

The script will turn on images temporarily so Mail downloads them when needed.

[ Reply to This | # ]
Easily disable network connections when necessary
Authored by: Max Mouseroom on Jun 17, '03 08:47:04PM

Wouldn't it be more effective to use an app like Little Snitch for controlling all software's unnecessary or unexpected connections to the 'net? Just IMHO.





[ Reply to This | # ]
This is an awesome hint!
Authored by: macFanDave on Jun 18, '03 10:46:44PM

Especially for using the Help Viewer.

You can get decent performance from Help Viewer by restricting its access to the Internet because part of its problems are from searching networks for files.

Of course, it's only good if you have the help files locally. For instance, a lot of the iPhoto pages came up rapidly once I was free from the network. I'm guessing (I may very well be wrong) that when you are connected to the Internet that it checks for updated help pages before it loads the local, and possibly outdated, file.



[ Reply to This | # ]