Tag: Neighbors

Setting Up SSH Tunnels With Putty

Posted by – March 3, 2009

Always ensure secure network connections.

Always ensure secure network connections.

I’ve been playing around with VPN’s and ssh tunnels to try and get my ipod touch to use something secure when I’m connecting to random wireless networks.  Needless to say it’s not working so great.  I want my itouch to tunnel everything through ssh to my server at home, but Apple hasn’t ever thought of that nor can I find any application to do so (and probably won’t as it would need to run in the background which Apple doesn’t allow, at least when your not jailbroken).  It’s leaving me little choice but to jailbreak or else I can’t have secure connections without setting up a VPN over IPsec which is about as fun as it sounds.

So while I was toying around with different things, it occurred to me that many people don’t know how to secure their traffic and prevent people form listening in.  I’m going to show you how you can take a windows PC or laptop, and route web traffic through a shell account you have ssh access to.  I’ll then show you how to setup FireFox and the SwitchProxy extension to use the tunnel efficiently, as well as the basic premise to make any program you have access the tunnel as well.

First I guess I should explain just why you’d want to go to the trouble of doing all this.  Well, whenever you use someone else’s connection whether it be a wireless access point at a coffee shop, shopping mall, neighbor’s or even plugged into a school’s network the bulk of your web traffic is sent as plain text.  This means anyone who wants to can probably listen in on anything you say to your friends on an IM client, or even check your email if your not enforcing SSL.  Even on a WPA or WEB enabled wireless connection your data would be easy enough to sniff if the  attacker has time enough to crack the key.  I know many people who even go to a coffee shop and setup their own laptop to act like an access point, collecting all the information for anyone who connects to it, in a classic man-in-the-middle attack.

Alright, so the first thing you need to do is open Putty.  If you don’t have Putty already get it, it’s one of if not the best terminal program for Windows!  Alright now that it’s open to go ‘SSH > Tunnels’ on the left hand menu.  In this section, click on the radio button marked ‘Dynamic’ and put ‘9999’ (or any port of your choosing, providing it’s not in use) in the ‘Source port’ text box, click “Add”.

Setting Up The SSH Tunnel in Putty.

Setting Up The SSH Tunnel in Putty.

Now go to the ‘Session’ Menu on the left side again, and enter the server information.  Then Name it, and click save.  it should look something like this:

Saving the Session in Putty.

Saving the Session in Putty.

Alright so now that the session is saved with your tunnel settings your now ready to go.  Login to your shell, and just leave it there for now (you can do anything you’d normally do, except leave [which will close the tunnel]), and open FireFox.  Go to Tools > Options, then select the ‘Advanced’ Tab and click on ‘Settings’ where it says “Connection: Configure how FireFox connects to the Internet”.

Firefox connection settings, to put in the address of the SSH tunnel.

Firefox connection settings, to put in the address of the SSH tunnel.

Now select “Manual Proxy Configuration” and for the “SOCKS Host” enter ‘localhost’ and ‘9999’ for the port (unless you specified something else earlier).  Accept all changes.  Your now browsing the web through FireFox securely through your new SSH tunnel.  Keep in mind if you close your Putty terminal you’ll get ‘connection refused’ messages until you either reconnect to the shell or you go into your settings and remove the proxy.

Firefox Proxy Settings.

Firefox Proxy Settings.

Now that you have the basic premise of how to setup your SSH tunnel through Putty, we’re going to install the SwitchProxy Firefox extention to make the switch to secure browsing simple and quick.  SO go ahead and grab a copy of SwitchProxy from the Mozilla Add-on website.  Install it, then restart FireFox (as required).  You’ll now notice that in the bottom right corner it’ll say “Proxy: None”.  You’ll also notice an annoying toolbar, which you can right-click on and remove luckily.

Alright, so right-click the bottom right corner, and select “Manage Proxies”, click “Add” then select “Standard”, name it, enter ‘localhost’ for the ‘SOCKS proxy’ and ‘9999’ for the port, and finally select “SOCKS v5″ and save changes.  You can now right-click SwitchProxy in the bottom corner, and select ‘SSH Tunnel” (or whatever you named it) and switch effortless back and forth between secure and default connections.

Adding the SSH tunnel to SwitchProxy.

Adding the SSH tunnel to SwitchProxy.

Phew.  That seemed like a bit of work, but it’s well worth it to have this setup for whenever you may find yourself in unknown territory.  Keep in mind you can set ‘localhost’ and port ‘9999’ as ANY proxy you find in any program you use in order to secure it.  Pidgin, MSN, AIM are all good candidates as are POP3 and IMAP mail clients if they aren’t (and even if they are) SSL enabled.

I hope this guide helps at least someone out there.  If anyone has an ideas on how to tunnel through on an ipod touch be sure to let me know.

Edit: You may also want to go into FireFox’s about:config (but entering it into the address bar) and changing network.proxy.socks_remote_dns to true.  This will send DNS requests to the tunnel as well for added anonymity.

Loud Neighbors And A Free TV

Posted by – May 28, 2008

Most of Monday went by with not much excitement. I haven’t been feeling well so spent the day working on the relaunch of Freedom-Uplink and it’s services. Little did I know that when we would try to fall asleep Monday night, we would be lead on an adventure to get a free TV.

It was around midnight when Sara and I decided it was about time to go to bed, right after we finished a long set on Rock Band’s Band World Tour. We did our routine and laid down, seconds later our upstairs neighbor turned on some dance/rave music; BOOM BOOM BOOM. This had happened before and it became a farce having to get the landlord to pretty much break the door down (he has keys but the chain-lock prevents entry without destroying the doorframe).

I reluctantly get up, as does Sara as she’s sort of cranky (as am I) and wants to get this resolved ASAP. Upon arriving upstairs you can easily hear the pounding of the music in the hall, the reason it doesn’t disturb others is the walls are concrete and extremely soundproofed, but the floor isn’t and they’re on the top. Only us sixth floor folk to be annoyed.

Sara proceeds tro ring the door bell, we receive no answer, no stirring, nothing. She rings again, nothing. SHe then gets frustrated and rings the doorbell repeatedly ding-dong-ding-dong-ding-dong, still nothing. She then goes insane on the doorbell for a good thirty seconds and finally, nothing. This is exactly what happened prior when the landlord had to practically break the door down, and no the resident isn’t disabled or passed out or sleeping.

At this point I’m quite fed up with all this crap and even wonder if I should just not bother the landlord and call the cops as we have bylaws that prevent loud or disturbing sounds after 11PM within city limits. This way there are more repercussions for not opening the door, and they’d pay for the damages out-of-pocket. While I ponder this I decide to bang on the door with my closed fist, and I do it hard. Hard enough that the peep-hole rattles (which is not only weird but shows the caliber of the place we live in), still nothing. I decide to go get the landlord yet again, and head for the elevator with Sara.

As the elevator doors open and Sara steps inside, I hear the music stop and the chain-lock coming undone. I wait, and the door opens and a man and a woman walk out, the man clearly upset. He begins ranting about why I was kicking his door, we explained we didn’t kick it, and that his music is waaaay too loud for 12:30 at night. He then goes on to say that he’s only home a few days ever couple of months and that he likes his music loud. I explain that I’m sorry he’s away so much but he does share an apartment with other human beings that need to work in the morning. He then states that he does not care and likes his bass “pounding”. I then state that he may not care but we do, and he’s breaking a city bylaw and thus the police WOULD care as well. He then invites me to step outside and settle this, and the girl tells him not to. The guy starts approaching me, talking about how he likes his music. I stand my ground.

The guy is definitely bigger than I am, but I wasn’t worried at all. Sara was safely using me as a meat shield, and he approached and stopped about two or three feet away. He then began to apologize profusely. I was rather confused, but he continued about how he’s sorry and that he’s never home, and that his sister is over and they got carried away. This went on for a good 10-15 minutes of him apologizing, and it defussed the situation. We were ready to be on our way, mission accomplished. Or so we thought.

After receiving way too many apologizes from both him and his sister, we were invited in to see why his stereo appeared so loud downstairs, we reluctantly followed and remained cautious. Inside we first noticed that everything was spotless, clean as a whistle, and obviously not lived-in. Large flat screen TV, Hundreds and hundreds of DVDs and Video Games, no garbage, no real sign that anyone was living there.

We discussed his apartment for awhile and were eventually ushered to sit down, which we did eventually after stating we should probably be going.  The guy (who we found out was named Vince and his sister Nikki) poured me a drink and we discussed the apartment and how it sucks to live here but it’s cheap.  He seems to have as many troubles with the owners as we do but he’s taken them to court several times.  He also explains that he works in the oil fields in Alberta and recently his company has opted to fly him home once every ten days, so we may see him more often.  He said that he’ll try to be a bit more considerate and that if we ever hear the music we’re welcome to come up and party, drinks are on him.  We shook hands, and eventually departed.

We arrived back to our place, got ready for bed again, when there was a knock at the door.  VInce wnated to know if we wanted a free TV.  This sounded strange, so after a bit of clarification he stated that he had bought a new TV and was meaning to offload this “old one”.  I went up to take a look, passing a fairly new microwave in the west stairwell he said he was waiting for someone to take, and we could if we wanted.  I saw the TV, it’s in very good condition and stated that if he was just throwing it out or something anyway that we’d take it and use it or find it a good home.  He helped me grab it and I took it back to our place and set it in the corner.  That’s where it has stayed since.

The whole experience came off being really creepy and odd, and I think I’ve kept the TV in the corner in case he changes his mind and wants it back, but it seems like he doesn’t plan on wanting it back.  I now know my neighbor and he seemed genuine when it came to wanting to hang out on occasion, so I guess it ended well.  In what started as a cranky angry tirade to get some sleep ended with a free TV.

Maybe I should get angry more often.