KW1203 – Stick It

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.

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.

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.

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.

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

Turn your home into a virtual datacenter with Virtualbox.

You’ve heard us talk lots of times about Virtualbox. Our FAVORITE free (as in ‘Gratis’) cross platform virtualisation software. As we mentioned in the previous podcast episode about “Proxmox” (a more serious virtualisation tool) the machines in our home with their I5 and i7 processors and “Gigglebytes” of ram .. are mostly idling around in a corner when you’re not playing Call of Duty (and perhaps you even do THAT on the Xbox) So lets give those machines something to DO ! Running a ‘dedicated’ solution like dropbox might just be a little too much, but perhaps you have some cycles to spare on another system that is also being used as a desktop ? Why not try Virtualbox.

As an example : Currently I have dragged my I7, 16 gigabyte’s of ram Mac Mini downstairs and hooked it up to our tv. Since it carries most of our media it was a little silly to have it running in my upstairs office and having to stream everything back to the TV using a second (front end) box. So now the little bugger sits in our media cabinet with some 4 terrabyte of USB Harddisks hooked up to it. Having it just sit there running OSX and acting as a mediaserver or fileserver was a waste of power and cpu cycles. So with virtualbox I gave it something to do. I installed Virtualbox, hooked up a big external usb drive and started cooking some VM’s.

  • Ubuntu 12.10 vm with LXDE : This is my ‘internal’ ubuntu desktop. I use it for running cronjobs, copy operations and scripts that are meant for internal use only. Its my ‘Secure box’. I’ve enabled the RDP server on it (a builtin function of Virtualbox) so I can cantrol the screen of the virtual machine from afar.
  • Ubuntu 12.10 vm with LXDE : The second machine has a torrent client running as does the ‘dirty deeds’ that need to be done on the internet. Insecure surfing, downloading and remote access via SSH are its main goals. Once a week I ‘roll back’ the machine to its original (clean) post install state with the “snapshot” function of Virtualbox.
  • Ubuntu 12.10 Server : The main task of this machine is running OWNCLOUD (also featured in one of our podcasts) as my personal cloud storage.
  • Nas4Free : With a 1800 gigabyte virtual disk, this VIRTUAL machine acts as my main file storage system. So instead of putting my files on a disk and sharing them out via the file-sharing options on my (host) OSX system, I made a virtual machine of a linux application geared towards storage and filesharing … and put all of my files INSIDE a virtual machine. Performance is very good so far and the added perks to running Nas4free are going to be a topic for next weeks podcast.

In the end, controlling these virtual machines is a little messy sometimes. I mean you can’t just interrupt @Niejana when she is watching “Blood and Chrome” to say : Sorry about that, I need to mess with something on my Virtualbox and for that I need to use the TV ?   You need ‘remote’ ways to manage that virtual machine situation.

  • Controlling the Virtual Machines. Remote controlling the virtual machines is easy. You can use the built in RDP server in Virtualbox to use an RDP client (on any operating system) to open up the remote machine. If you also want to access them from the outside, try installing Teamviewer on the Virtual Machine.  If you are using a Linux operating system as your virtual machine you can enable the SSH Server and go in via the terminal.
  • Controlling Virtualbox. Unbeknown to many, virtualbox has a powerful set of terminal commands you can use. With a simple terminal window to my Mac (SSH) I can use the ‘VboxManage’ commands to do just about anything. Make a new virtual machine, clone a drive, resize a drive. Everything runs in the background and its a very very powerful tool. You can find the entire list of Virtualbox commands HERE
  • Controlling Virtualbox with a web interface. Virtualbox also has a web interface that helps you control your virtualmachines. In a point and click way you can start and stop VM’s and do anything you can do on the ‘regular’ desktop window. Installing it might be a little chore (depending on the host operating system you use) but the results are pretty spiffy. Find the howto HERE.  

And with those little tips you know can turn that headless box OR that powerful machine upstairs that is always on, but sometimes used by your kids for gaming… into your own personal datacenter. Don’t have the spare beige box for Proxmox ? Just have a desktop and want to get it to do some cool things ‘under the hood’. Want your own invisible datacenter ?  Here you go ! Download Virtualbox NOW.

Related Posts

Use "mydevices" to control all of your web based interfaces from your smartphone.

Most of your devices these days have webbased interfaces that you can easily open up with a browser. The fact that you go and sit behind a computer to do that is either to blame on the fact that you don’t own a smartphone or tablet thats hooked up to your wifi , or that you are just plain dumb. (pardon my french) . You see , these mobile gems are perfect for controlling all kinds of devices throughout the house and makes you a digital “master and commander” of your own casa. Personally I get a kick out of doing stuff on my tablet or smartphone and need to resist the urge to start drinking ‘Tea, earl grey, hot’ while calling out “make it so” to my better half. But remembering all the ip addresses of all of those devices IS pretty lame.

Once you make shortcuts and ram them into a folder it gets better, but you still need to remember logins and passwords. Not anymore though. With this smart little app will help you control devices on your network with some added spiffy features :

-Utilizes UPnP and Bonjour to find devices on your home network
-Displays detailed device information (IP address, model, vendor, type, etc.)
-Includes integrated viewer so you can quickly access device web pages within the application
-Uses default device icons in cases where the device doesn’t provide a custom icon
-View UPnP device description documents as formatted XML

So just plop it on your IOS device and control your digital ecosphere from the palm of your hand with “Mydevices”  Thanx to @macmommy for the tip.

Related Posts

5 tools to become Omnipresent.

The downside of having both Tech Skills and a family … is that sometimes you become the family helpdesk. Before you know it people ring you up to fix their computer, and for some (like my mum in law and my wife’s “Ubuntu” Granny) a smoothly running computer is VERY important. But sometimes when the phone rings i’m wearing my PJ’s and don’t feel like hopping in the car and driving over. Or sometimes the people I need to help out live halfway around the planet. Time for my 5 favorite tools for digital omnipresence. All I need is a computer, a fast pipe and these tools and “Killroy 2.0 is .. everywhere”

Teamviewer : When it comes to cross-platform remote control of systems over the internet, Teamviewer takes the cake. Because I love to control all kind of systems without having to bother about the OS, Teamviewer is the perfect tool for the job. On demand or unattended remote control sessions, a chatbox and file transfer. Teamviewer does it all. I install teamviewer on all the systems I manage for remote control without needing to bother with open ports or IP addresses.

Dropbox :  Suprising as it might seem, I use dropbox for a lot of my remote work. The Ubuntu granny has her pictures and document folder stored on her dropbox accounts. That ensures simple but effective backups. But with access to her dropbox account I can drop or pickup files she needs. Picture from her grandchild not opening ? Strange attachment ? Dropbox is the perfect tool for remote file management.

Skype : (auto Answer) : Sometimes it helps if you can talk to the people you are helping out. I use Skype to do just that. The combination with teamviewer is excellent and it allows me to talk and type at the same time. The difference with “being there” is very slight indeed.

No-ip.org : When the ‘remote person’ has a dynamic IP address its sometimes hard to “find them back” on the internet. If you google “what is my Ip” you get just that, but to avoid that extra manual step, its nice to bind a domain name to a dynamic ip. Dyndns used to offer this service for free, but not anymore. No-Ip.org does do this and gives you a choice of several ‘client’ applications to install on the remote systems.

SSH : When it comes to remote controlling systems via the command line, sending files back and forth or even piping through X or VNC sessions , SSH is ‘tha bomb’. Versatile, secure and a great way to tunnel through the internet for remote omnipresence.

 

 

Related Posts

The Knightcast Episode 35 : Remote Domination.

Remote
The Knightcast Episode 35 : Remote Domination. 

Direct link to the show :

http://www.knightwise.com/podcasts/kc_2082006.mp3

Summary. 

Don't even leave your seat for episode 35 of the Knightcast : Remote domination. We talk about the tools of the trade how to remote control every PC that you own. With tips, howto's and cool programs we turn your computerroom obsolete and let you control everything from your couch. With music from Noplasticinside its another Info- Loaded Knightcast.

Promo : Miketechshow

Download the Shownotes in PDF.

 

{mos_sb_discuss:5}

Related Posts