KW1203 – Stick It

Dec 23

This week Knightwise dives back into a topic to help you make better use of hostile foreign computers. With the proliferation of high-speed high-capacity USB thumb drives it’s easier than ever before to carry your computing workload with you and run your life from a stick.

Links

Credits

Episode produced by Keith Murray
Home screen picture courtesy of MaxPixel

Related Posts


Building a simple Offsite backup server with an EEEpc and Bittorrent Sync.

Jan 04

Some gadgets are just hard to throw out. Perhaps you keep hanging on to them because you have this plan of “using them someday” for “some project”. Perhaps you keep hanging on to them because of nostalgia. Whatever reason you might choose, those geeky gadgets that keep occupying that box in your office aren’t getting any younger. Why not put them to good use ?

Lets take 2 items in MY junk-box as an example. An aging Asus EEE 701 Netbook PC that I have been hanging onto because of sentimental reasons. (I smuggled it in from the US way before these babies were available in Belgium) Its keyboard is broken and its low specs when it comes to storage, memory and cpu power aren’t helping it in finding something useful to do these days. The second item is my first 1tb external hard drive. I haven’t thrown this one out because its on my ‘for-some-project-some-day’ list. Its been on the list for 2 years now … So lets smash them together and turn them into a Remote backup solution using open source software and Bittorrent technology.

1013636_10152730916287912_8486272877834744564_n

Step 1 : Turn the EEEpc into a headless server.

I downloaded the Image for Ubuntu’s ‘minimal installer’ off the net and have had it kicking around on an old USB stick for a while now. Because of its small footprint its ideal to do ‘light’ installations of Ubuntu because you can choose which components you want to install. I chose the ‘minimal Ubuntu server’ and the SSH server component. When the installation was complete I rebooted the laptop and hooked up the external USB drive (that I had formatted in one big FAT32 partition)

Step 2 : Install Webmin and mount the drive.

Because I was going to use my external hard drive to store my remote backups on (the EEEpc doesn’t have enough storage) I needed to be sure it was always mounted correctly if my little laptop should have to reboot. So instead of messing around with stuff like FStab config files I installed Webmin. (a Web-based interface to your Linux server). Using the ‘Disk and network file system’ menu I mounted the external drive into a folder called ‘backup drive’ that I had created in my home directory. This way I was sure that the external drive was always mounted correctly in the same folder.

Links : Howto install Webmin.

Step 3 : Install Bittorrent Sync.
Next up I installed a copy of Bittorrent Sync both on my local server and on the old eeePc. Following THIS tutorial lets you install Bittorrent Sync and configure the Web interface to be accessible from all over your network. (So make sure you choose a very secure administrator password). When installing Bittorrent sync this way, you are also sure the service always starts up when your computer reboots.

Links : Howto install Bittorrent sync. 

After the installation was complete I surfed to the Bittorrent web interface of my home server (source system) in one tab, and to that of my EEEpc (remote destination system) on another one.

Step 4 : Share a folder on your Source system.

Now it was pretty smooth sailing. On the Bittorrent web interface of my SOURCE machine I made a bittorrent share of each folder I wanted to backup remotely. I right clicked “properties” once the folder was created and copied the ‘READ ONLY’ secret.

Step 5 : Enter the key for the shared folder on your remote destination system.

Next up I went to the tab of my ‘remote destination system’ and entered the READ ONLY key. I selected a folder on my external drive where the files needed to be synced towards. (in my /home/backupdrive/ directory)

Step 6 : Do the initial copy

After repeating the process above for all the folders I wanted to ‘sync remotely’ I just had to wait for the initial copy to complete. After that it was time to pickup the EEEpc and the External drive and bring them to their new (remote) home. I hooked the EEEpc up to the network, started up the machine and … that was that … headless remote backup solution done.

Epilogue.

Because Bittorrent sync doesn’t care about open ports or anything I didn’t have to mess with the router on the remote end of my backup solution. There were no ports to forward and even a static IP was not required for the remote machine. Just connect it , fire it up and .. boom. Using the ‘read only’ secret is an insurance that changes to my files are only synced one way : From the source to the remote system (and never the other way around).

You can expand this setup (and increase the security at the remote end) by syncing over encrypted ZIP files. That way people can’t access the data should your system be compromised.

In the end its a great simple way to use an old system (you can even use an old laptop with a broken screen for this) and give it a new lease on life. The setup is simple, the interfaces are web based and the whole setup is perfect for a remote backup destination at your parents or in laws.

So secure your data and put those old clunkers back in action !

Related Posts

Privacy Week : Tunnel traffic through your home network with Sshuttle.

Feb 06

Today’s tip in our “Privacy week” is geared a little bit towards the more advanced geek .. (Who am I kidding, you are ALL advanced Geeks here). In our every lasting quest to ensure our privacy when surfing on “foreign networks” like the one at work, the one at your dorm or the free wifi hotspot at Starbucks , we try to find more ways to make sure all your web traffic is encrypted and your privacy is kept safe.

kirk-and-spock-with-the-galileo

Enter SSHuttle ( NOOO , not the STAR TREK Shuttle) , A brilliant little transparent proxy application that directs ALL or PART of the network traffic from your trusty Linux or Mac machine (the laptop you use on the road) through an SSH tunnel to an SSH server of your choice (perhaps your own server at home). That way your traffic is completely (or partially) obscured from whoever is trying to sniff your traffic on an untrusted network. An added bonus is however that it is a transparent proxy ! This means your computer will actually think it is directly connected to the network where the SSH server is running. It is like running a very very very long cable through the internet straight from your machine to the network where your SSH server is located. 

So let’s start cooking.

Ingredients.

How to install SSHuttle on your client machine.

  • Install SSHuttle on your Linux machine using the command :  sudo apt-get install sshuttle
  • Install SSHuttle on your Mac by first installing HOMEBREW APP. (Installation instructions) and then typing brew install sshuttle

Shuttle is simple but VERY powerful.  It will create an encrypted tunnel between your laptop and the SSH server you setup at home. Depending on what kind of traffic you want to shove through that tunnel you can do different things like :

  • Just tunnel your browser traffic through the tunnel,
  • Shove all of your web traffic through the tunnel (including dns requests),
  • Shove ALL of your traffic through the tunnel.
  • Set up a “site 2 site” VPN  between the network you are working on and your network at home.
  • … and more crazy stuff.

So how does it work ? 

Once installed using SSHuttle is pretty simple. SSHuttle works from the command line and depending on the “switches” it will do different things for you. So on your client laptop , fire up your terminal and start typing.

  • sshuttle --dns -r username@yourremoteserver.com:2222 0/0

Enter the command above to push ALL of your traffic through the SSH tunnel towards your server at home. This is the example of running a virtual network cable THROUGH the internet towards your switch at home. All of your traffic is sent through this encrypted tunnel. USERNAME = A user you have created on your SSH server at home. YOURREMOTESERVER.COM = The external ip address (or Dynamic DNS name) of your home router. 2222 = The port on which you have your SSH server running. In this example I took a non-default port.

  • sshuttle  -r username@yourremoteserver.com:2222 192.168.0.0/24

With this command you can create a site to site VPN. Instead of typing 0/0 is going to send ALL the traffic through the tunnel. Typing the network range of your home network (in this case 192.168.0.0) tells SShuttle to send all the traffic that needs to go to the 192.168.0.0 domain through the tunnel, while sending out the rest of your traffic through  whatever network gateway you are connected to.  The /24 is your subnet mask ( you know , the 255.255.255.0 subnet number of your network).

There are a lot of other switches that you can use , but if you use the two commands we mentioned above you will have a LOT of power at your fingertips. I love using the second command. It allows me to connect to the exchange server at work for my work stuff, but also lets me quickly open up the web interface of my home router (on the LAN SIDE) to do some tinkering. SSHuttle is a very very nice tool that keeps you connected .. and keeps your privacy .. private.

Find out more about SSHUTTLE in this HAK5 episode.

Related Posts

kw606 : Making your Mac cross platform friendly.

Jul 06

macbook-sliderWe dive behind the microphone and give all of you Apple users a slice of pie you don’t want to pass up on. We talk about making your Mac “Slider” friendly and how to put up ladders and crawl out of Apple’s walled garden. We have quite a slew of interesting tips and tricks on how to run “cross platform” applications, files, filesystems and connections through your favorite Mac. Learn and listen to this episode of the podcast that is filled to the rim with community feedback and contributions and great music by Youtube princess Juless.

Shownotes.

Tweak code (Copy and paste in your OSX command line)

#make dock appear instantatiously

defaults write com.apple.Dock autohide-delay -float 0 && killall Dock

#don’t reopen every file when you reopen your app.

#in preview

defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool false

#in quicktime

defaults write com.apple.QuickTimePlayerX NSQuitAlwaysKeepsWindows -bool false

#kill the dashboard

defaults write com.apple.dashboard mcx-disabled -boolean YES

killall Dock

#show the path in the finder

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

#disable window animations

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#enable direct scrolling

defaults write -g NSScrollAnimationEnabled -bool NO

#no more bouncy windows when scrolling

defaults write -g NSScrollViewRubberbanding -int 0

#set time machine backup to 1800

sudo defaults write/System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800

#force expanded save-and-print  dialogs

defaults write -g NSNavPanelExpandedStateForSaveMode -boolean true

defaults write -g PMPrintingExpandedStateForPrint -boolean true

#no 3d-glassy dock

defaults write com.apple.dock no-glass -boolean yes

#show hidden files in finder

#defaults write com.apple.finder AppleShowAllFiles TRUE

#killall Finder

#3d glassy dock

defaults write com.apple.dock no-glass -boolean no

#make hidden app icons semi transparent

defaults write com.apple.Dock showhidden -boolean yes

#create a ‘recent items’ stack

defaults write com.apple.dock persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’

#screen grabs in jpg

defaults write com.apple.screencapture type jpg

 

Related Posts


Wordgrinder takes you back to the (productive) days of Wordperfect.

Jan 29

I mentioned a couple of interesting command line suggestions for a good Wordprocessor a while ago in a previous post. But thanks for the research I did for the “Return of the netbook” podcast, I came across Wordgrinder. Unlike most word processing applications from Redmont, Wordgrinder is not infested by a talking paper clip, and its menu bar has not been designed like a hidden Chinese puzzle that only Savants can solve.

Wordgrinder is also a different league from the  text editors like VIM or Emacs, and is not geared towards code manipulation like Nano. Wordgrinder reminds me of .. Wordperfect. Remember the little paper strip secretaries had taped to their keyboards in order to remind them what function key did what ? Wordgrinder is more like that. Hitting the escape key brings you into the menu bar where you can select all the functions you expect from a real Wordprocessor… from the early Nineties.

But in a world swamped with widgets, buttons and distractions, in a universe where every application at least has one dingdong to tweet whenever you even THOUGHT about farting in the elevator .. Wordgrinder is safe haven of simplicity and focus. Run it natively on any Linux system or access it via an SSH connection to your Linux system from your Mac or your Pc.  Sure it isn’t high tech, but it does the job pretty well. For all those times you need to knuckle down .. Wordgrinder is your friend.

Links : Wordgrinder. 

Install it from the command line (On Ubuntu)

sudo apt-get install wordgrinder

Related Posts