In my quest to have total mobility with my Powerbook I have finally found a solution that allows me to access my mail regardless of any firewalls imposed by my connection location.
Using ssh, which I talked about previously here and here, I forwarded the POP (110) and SMTP (25) ports on my laptop through a tunnel inside the secure shell (ssh) connection. The ports are (hopefully) resolved at the remote server and any requests for ports 25 or 110 on my laptop pass-through the tunnel and “execute” on the remote server.
I have three perl scripts for establishing a ssh connection and forwarding ports: work, home, and remote. The first, called “work”, connects to my Windows NT workstation. This machine is logged into the network and can ssh out of the client network to the internet at large. All the forwards in my work script are replicated on the NT box. The ssh script on NT connects to a Linux server, outside the local firewall, with a HTTP proxy server, and open POP and SMTP ports. The work ssh command looks like this:
ssh -L25:localhost:25 -L110:localhost:110 -L8080:localhost:8080 -luserid host -N -f
The port forwards, indicated by the ‘-L’ parameter setup a listener on each port listed (25, 110, and 8080) and pass any requests to those ports to the proxy named ’localhost’ on the remote machine, named ‘host’.
The ‘-l’ parameter indicates the user id I wish to use for this connection, and ‘host’ is the name or IP address of the remote server I wish to access.
The ‘-N’ parameter causes no remote command to be executed. I don’t really understand this parameter, except to say that it is supposed to be good for port forwarding.
The ‘-f’ parameter cause the ssh process to goto background as it runs, freeing up the shell used to start it. More on this later.
On the NT box the ssh command looks like this:
ssh -L25:relay.hostname.com:25 -L110:mail.hostname.com -L8080:localhost:3128 -luserid remoteHost.com
Here I am forwarding the POP and SMTP ports to the hostname that is my mail server. Your name will obviously be different. HTTP (8080) is forwarded to a HTTP proxy running on the remote server itself. In effect the forwards for 25 and 110 say, don’t access these ports here on the NT machine, instead follow the ssh connection and resolve them there. This gets me outside the firewall and my mail servers are now visible. (I’m actually using putty on my NT box, so the command isn’t visible.)
My mail account settings have to be changed to take advantage of these port forwards. Specifically I removed the existing POP and SMTP server settings and replaced them both with ‘127.0.0.1’, which is the localhost address of my machine. Now when the e-mail client accesses either POP or SMTP the request is forwarded through the ssh connection to be resolved at the remote host. Viola, secure (encrypted) e-mail access from behind a firewall.
The second script, called “home” is used while I am at home, connecting though my broadband modem. I don’t need to forward ports and secure shell from home but, since my mail accounts have all been setup to point to 127.0.0.1, not using a script would require changing them each time I came home. Using the script allows those settings to remain unchanged.
Since this script only needs to create a port forward, the remote host I connect to is myself. Like so,
ssh -L25:relay.hostname.com -L110:mail.hostname.com -luserid -N -f 127.0.0.1
Same as the work script, but I don’t need to forward HTTP requests, and I am connection back to myself. My machine has an open connection to the internet that allows for POP and SMTP, this script exists just to capture requests from my mail client and pass them on to the appropriate servers.
The final script, called “remote” combines the work script, and the ssh command issued in my NT box. This script is useful when the internet connection available has a firewall, but I don’t need to be logged in as I do at work. The command looks like this:
ssh -L25:relay.hostname.com:25 -L110:mail.hostname.com:110 -L8080:localhost:3128 -N -f remoteHost
Here I am forwarding HTTP, POP, and SMTP requests through a machine outside any local firewalls.
Because I used the ‘-f’ parameter in my ssh command, the ssh process happens in the background, freeing up the shell used to start it. This is nice and tidy, but switching from home to work, or work to remote, requires that you first shut down any existing ssh processes. The actual perl script has two more lines to it that find and kill any running ssh connections. They look like this:
#!/usr/bin/perl open (PS, “ps auxw | grep 'ssh -L' | grep -v grep | awk ‘{ print $2 }’|”); while (){ chop; system (“sudo kill -9 $_”);}
I’m not a perl coder by any stretch, but I understand the first line to be collecting all the process ids of running ssh connections. The second line then kills these processes. The final line of each script is the ssh command itself, as described above.
I know this seems complex and it is, but in a good geeky way. I’m happy, and I get my e-mail (thru an encrypted link) regardless of where I connect from.
Olive oil
1 package chicken breasts, rinsed and cut into cubes
1 medium onion, finely chopped
1/2 medium green pepper, finely chopped
2-3 garlic cloves, finely chopped
1 can diced or finely diced tomatoes
1 Tablespoon fresh lemon juice
2 bay leaves
1-2 tablespoons parsley
Salt
Pepper
5-6 squirts Tabasco
3 1/2 cups chicken stock (1 package)
1 package yellow rice (I use Vigo brand)
1 Can peas
Pimento
Heat 2-3 tablespoons oil over moderate heat in non-stick frying pan. Add chicken and cook until pale gold. Season with salt and pepper, turning frequently to evenly brown all sides. Transfer to heavy oven proof casserole or stew pot with tight fitting lid.
Sauté onion and green pepper in left over oil from chicken. Season with salt and pepper and cook until onion starts to turn gold. Toss in garlic and stir for another minute and then add can of diced tomatoes. Stir together and then pour mixture over chicken.
Add lemon juice, bay leaves, parsley, and hot sauce to chicken. Set aside enough stock to make rice according to package directions, in the case of Vigo 2 cups are needed. Pour remaining chicken stock over chicken and vegetable mixture, about 1 1/2 cups. Bring entire mixture to boil, then reduce heat and simmer with lid on for 15 minutes. (Meanwhile, preheat over to 325 degrees, removing oven rack to make room for stew pot/casserole.)
Once everything has simmered for 15 minutes, put set aside stock in saucepan and start to prepare yellow rice. Once rice is in the stock and has been brought to a boil, pour rice into stew pot. Bring entire mixture to a boil once again and then cover with lid and place in oven for 20-25 minutes.
At 20 minutes check the moisture level. Leaving it in the over a few minutes more will reduce the moisture. If desired warm peas in microwave. (If peas are placed on hot chicken they will warm by themselves.) Serve, allowing guests to add their own peas and pimento. Extra hot sauce maybe used individually as well. Serves 4-5 people.
For the past eleven months I’ve been living with a secret. Only now can I write about it here, and I can honestly say I am relieved. Keeping a secret is hard work, and it forces you to lie by omission. I discovered that I don’t like lying, even by omission, to my wife.
You see the secret was a surprise weekend visit by her best friends in honor of her birthday. Michele’s birthday falls on December 24th, which has meant that it was always overshadowed by Christmas. In the 7 years that I have been with her for her birthday I have tried to make it special in some way.
Last year we took a Hawaiian cruise, the year before we traveled to her adult hometown of Tampa to see family and friends. This year however we are staying home for the holidays. So I decided to bring her friends here.
In January I sent out an e-mail invitation, and everyone agreed to come. Planning something 11 months in advance isn’t easy on ones stress level. So much can happen in a year. For a while this summer it looked like we would be relocating, I was afraid that my plans would have to be postponed for a year. I was happy when that eventuality never came to pass. I could never have kept my mouth shut for an extra 12 months.
A few weeks ago I had another round of e-mail and cell phone conversations with her friends and they were all still eager to come. Flight times were examined and schedules confirmed. Now the pressure to keep my big mouth shut was really getting intense. Simple conversations were fraught with peril. Not saying, “Gee, when the girls are here, why don’t we…” became a tough thing.
This week has lasted forever. Knowing that I would finally be able to let my guard down made it even harder to not say something. Several times I nearly gave away the surprise just so I could relax and sleep normally again. On my way to work this morning, knowing that the next time I saw Michele the cat would be out of the bag, I was almost giddy with relief. As I sit here in the airport awaiting the plane’s arrival, I am anticipating her excitement and joy at seeing her friends.
Beginning in 2002 I decided to keep track of my income messages. In that first year I received 37,122 total messages. Since I was active in a couple of high-volume mailing lists, I received 11,553 good e-mails, leaving 25,569 spams.
25,569/11,553 equals a 2.213:1 bad:good ratio.
So far this year I have received 73,737 spams. I am no longer active in a mail list the number of good e-mails I get has dropped considerably. To date this year I have only gotten 904 good e-mails.
73,737 / 904 equals 81.567:1 bad:good ratio.
Eighty-one and a half spam for each and every message I want to read.
It’s time for something different. I’m tired of manually sifting through the increasing deluge of crap in my spam folder for the rare message I want.
SpamSieve has caught my eye before, but until now it didn’t support POP mailboxes. The latest version does support POP. However, only for Panther, Mac OS X 10.3.x.
I can’t wait to upgrade.
This Brain Persuasion Test is fun and, surprisingly accurate.
My results are as follows:
Auditory : 33% Visual : 66% Left : 50% Right : 50%
And the text explanation goes like this:
Mark, you exhibit an even balance between left- and right- hemisphere dominance and a slight preference for visual over auditory processing. With a score this balanced, it is likely that you would have slightly different results each time you complete this self-assessment quiz.
You are a well-rounded person, distinctly individualistic and artistic, an active and multidimensional learner. At the same time, you are logical and disciplined, can operate well within an organization, and are sensitive towards others without losing objectivity. You are organized and goal-directed. Although a “thinking” individual, you “take in” entire situations readily and can act on intuition.
You sometimes tend to vacillate in your learning styles. Learning might take you longer than someone of equal intellect, but you will tend to be more thorough and retain the material longer than those other individuals. You will alternate between logic and impulse. This vacillation will not normally be intentional or deliberate, so you may experience anxiety in situations where you are not certain which aspect of yourself will be called on.
With a slight preference for visual processing, you tend to be encompassing in your perceptions, process along multidimensional paths and be active in your attacking of situations or learning.
Overall, you should feel content with your life and yourself. You are, perhaps, a little too critical of yourself – and of others – while maintaining an “openness” which tempers that tendency. Indecisiveness is a problem and your creativity may not be in keeping with your potential. Being a pragmatist, you downplay this aspect of yourself and focus on the more immediate, obvious and the more functional.
So, how do you think?
It’s beginning to look and feel like Christmas around here. Yesterday we traveled over to my parents house to help decorate their tree. It was also my sister-in-laws birthday, so there was cake and presents. It was enjoyable to spend the afternoon and early evening with family. We played ‘Uno’ and laughed and visited and generally had a wonderful time.
Today Michele and I set up our tree, and decorated the living room. We have Santa as a theme, so there are several Santa’s big and small around the room. Each year after Christmas we visit our favorite interior store and collect new ornaments at reduced prices. So the first presents of the year are putting up the new pretties on the tree. In addition to some expensive and very “Currier and Ives” decorations, we also have some gaudy, cheap-o-depot stuff. Because it wouldn’t be Christmas without some trashy decorations.
We played Christmas music, drank egg nog, and had a thoroughly good time.
This week I finally got and installed an Apple Airport card. My Powerbook now sports 802.11b connectivity. Only I haven’t found any open access points. For that matter I haven’t found any access points at all.
My client site is part of the state government, and only in the past few years did they complete CAT-5 wiring in this agency. I wasn’t too surprised to find no base stations from my desk.
My neighbor has a wireless LAN in his home, but we live a good 100 feet apart and between walls, tress and other barriers I am not able to “see” his network.
At work one of the other consultants also has a laptop with built-in 802.11b and we are able to connect via a “computer to computer” network wirelessly. That’s pretty cool.
But on the whole it is something of a letdown to have this new functionality and not be able to readily use it. Both my brother and father have WAPs in their homes so when we visit them I’ll be able to connect, but the small city we live in has no published hot spots. The nearest ones listed are both inside Borders bookstores roughly 80 miles away.
I like having the functionality because I know that eventually I’ll be adding a wireless access point to our home, but right now it’s sort of like getting a really cool toy for Christmas and not having the right sized batteries on hand.
For the month of November I logged a total of 7,375 spams. This equates to 245 per day. For the year I now have received a total of 71,398 spam mails, making my monthly average 6,490.
For Christmas all I want is a $1 for each spam I’ve had to deal with this year.
{{ $image := .ResourceGetMatch “aidsdaylinkandthink.gif” }}
Five million people acquired HIV in 2003, bringing the world total to 40,000,000 people who are living with HIV today.
Of these 38,600,00 are adults, 19,200,000 are women, and 3,200,000 are children under the age of 15.
Three million people died from HIV/AIDS in 2003, making this most lethal year to date for this affliction.
It isn’t over.
Dean Announces HIV/AIDS Policy