Saw this floating around, been using it for a month or so now, works a treat. This is really no good for people that use Internet Connect or any Internet Services that use PPPD, but hey, if you're Ethernet connected, it works fine.
Start by creatings a new pppd file:
% su
% cd /usr/sbin/
% mv pppd pppd.orig
% vi pppd
Put in the following text:
#!/usr/bin/perl
my @args = @ARGV;
s/^defaultroute/nodefaultroute/ for @args;
exec "/usr/sbin/pppd.orig", @args;
Save the file and quit, then make the new file executable with chmod +x pppd, and you're done. Now every session that is started with PPPD will not create a default route. This includes dialup, PPTP, and I would think pppoe for ADSL. Once up, it's just a matter of routing the networks you want over the network. I've configured my PPTP server to assign me the routes, it seems to work fine.
I should begin by saying that Mail.app is a very pleasant mail reader to use. Sadly, it's just not powerful or practical when it comes to really interacting with real world network environments. In particular, it has none of the essential pre-connect or tunneling features of the unix mail readers like mutt. About the only thing one can control is the ports of the servers your using; luckily that is enough when you have root access to you own machine. Anyway, I got sick of needing to manually set up ssh port forwarding every time I wanted to send mail from my laptop when I was off campus, so I set up the following little trick to make it automatic.
I use the shareware product Brickhouse to manage my ipfw host firewall rules on my mac. Here is how to permit your Mac to ping outbound, but also block incoming pings.
Create two custom services:
Action Deny, service Custom Service Protocol icmp, source The internet, Destination my computer. Click Advanced Options and in box icmp Types, put 8, specifying icmp requests.
Directly below above rule, create a second rule. Action Allow, Custom Service, protocol icmp, source The Internet, Destination My Computer, and under Advanced Options, put ICMP types 0. This permits the echo responses back to your computer from pings you send outbound.
So some of you might say "Well ipfw is stateful packet inspection, why do I need to do the second rule?" Because ipfw dosn't keep state on icmp.
As everyone knows, AOL's browser is horrible! It is (finally) based on gecko, but they tweak it and make it unstable (not to mention that if AOL goes down, so does your browser). I do still have an AOL account and I wanted to make AOL open an external browser insted of its own. here's what I found:
Using your favorite text editor, open prefs.js in /Users -> userName -> Library -> Preferences -> America Online -> Profiles -> screenName -> randomString.slt, and add this line:
This works for any protocol which the embedded gecko would normally handle. So change the http to https or ftp or whatever you can think of, and it'll make AOL more usable. Warning: This does bad things if you get lots of HTML mail within AOL; I haven't figured that one out yet...
Being new to OS X, I really appreciate the "print to PDF" option for most apps and have taken to capturing web pages (confirmation screens, on-line documents, etc.) in PDF format. However, frequently I find myself wanting the links in the resultant "web capture" to be clickable. My solution is to save the page as "Web page, complete" in its own directory with my browser (Mozilla) and then I use HTMLDOC (GPL) from the command-line to translate the HTML to PDF via:
htmldoc --webpage -f outfile.pdf infile.html
The resultant PDF will be the HTML file deftly translated into PDF with links (internal or external to the document) that are clickable in Acrobat Reader (or any PDF reader that can read links).
In this forum thread, the topic of direct site-to-site FTP (moving files from one FTP server to another without visiting your local machine first) was brought up, with a few solutions covered. One was to use Fetch, which apparently has this feature built in, but seeing as how I don't like Fetch (UI bugs me, mainly), I came up with a way to do it from Transmit (or any FTP client that lets you look at the "computer" level of your machine to see locally mounted volumes). Check it out:
Mount the source FTP server in the Finder with Command-K (or Go -> Go to Server if you prefer menus).
Launch Transmit (or other FTP client, as noted above).
Navigate to the Computer level with the pop-up menu on the left-hand side of the Transmit window, and select the locally mounted FTP server.
Mount your target (destination) FTP server in the right-hand side of the Transmit window.
Do what comes naturally, and drag your stuff over!
I tried that on a whim just now, and it works amazingly well.
If you want to set up your own internet radio using Shoutcast, here are some instructions:
Follow the instructions at shoutcast.com to download, install, and configure your Shoutcast server. You will need to use the Terminal app to do this, and you'll need the Developer Tools installed as well.
Download MacAmp Lite X (aka MALTX). It's abandonware, and the codes for registation and the plugins power pack are at the bottom of the page (it doesn't matter which version you use).
Follow the instructions in Shoutcast's "Read Me" file.
One of the problems with using WebDAV is that you can't open (GET) files that have any kind of server-side rendering, like PHP files. When you open these files, if you can open them over WebDAV at all, you're treated to the rendered page. That sucks!
Here's where mod_rewrite comes in. Apache comes with a very powerful rewriting engine, which allows you to change the content of just about everything on the fly. We can use this power to turn our dynamic pages into something static to suit our editing needs.
Chances are your WebDAV directory configuration in httpd.conf looks something like this:
Now that I have a laptop and a wireless ethernet card (YAY!), I want to check
my email from public wi-fi points like the café down the street. But POP
and SMTP send my password in cleartext which I obviously don't want other people
using the same wi-fi point to sniff.
The solution? SSH.
Prerequisites:
I will assume you are able to ssh into your server and therefore, you have
a login and password and know your server's address. (If you have a commercial
webhost hosting your website and email, ask them to enable SSH login for you.)
I'm not always within earshot of the audible Buddy Alerts that AIM produces, but I always have my pager on my belt, so I wrote a few scripts to email a quick notice to my pager when a buddy signs on. Although I much prefer Fire as my chat client, it does not yet allow a buddy alert to call an AppleScript, so you'll have to use AOL's AIM client to achieve this. This method uses the UNIX mail command to send a message via sendmail (which must already be configured properly). Also, you must be using a Dynamic DNS service.