I’m beginning to hear a lot more about VPN’s (personal use for anonymity) in the press and I’m a bit worried it’s not understood enough.
Sales pitch: Get a VPN and your internet anonymity is restored.
Truth: It can be, but you have to be careful.
Other people will know more than me – there more than likely will be more to worry about than this. My main concern: cookies.
You get a lovely new vpn and then you use the same browser and user account to get on the net. BAM! You’re not anonymous any more!
A lot of the VPN providers sell the fact that it’s good for internet cafes. This is partly true – it will stop the others on the same wifi from snooping. The problem is that as soon as you log on to Facebook via your VPN you’re not anonymous. These are two different uses for a VPN and they’re not compatible. If you’re looking for anonymity what are you doing on a social network?! Scared of your ISP? You should be just as scared of any website you need to log on to!
My steps for a nice clean VPN:
Get a VPN service (don’t use it yet!)
Set up a fresh windows user account (some may say this is overkill but it’s saved me a few times. If you have a separate windows account then you don’t have to worry about your normal browser accidentally being opened and sending cookies.)
login to that user account and download firefox as the first thing you do
From now on, when on your VPN, only use your new windows account and firefox as your browser
Change the cookie settings to never allow cookies from a third party site (I’ve gone a bit further than this and ban all cookies and only re-enable source-cookies if I have a specific problem)
Install the NoScript firefox addon
Now you can start using your VPN
Never log on to any site – if you must log on to some sites then:
get a new anonymous email account that is unrelated to everything else
use that account for everything while you’re on your VPN
I needed to set up a new web application that was a copy of an existing web application. The constraint was that there was only one farm available to work with (I did have other farms but they were running different versions of SQL server).
Approach 1
I’ll first point out that this didn’t work, skip ahead if you’re not interested.
I went through the following steps:
perform a SQL backup of the content database
restore the backup into a new database
created a new web application
marked the content database that this created as offline
attached the cloned database to the web application with the powershell command Mount-SPContentDatabase – I was sure to pass in the -AssignNewDatabaseId parameter
The result was the database attached but it had no site collections in it.
It turns out that this approach could work but only if you attach it to a different farm. You can then backup that database and restore/attach it back on the source farm.
As I stated at the beginning – I didn’t have the luxury of a second farm.
Approach 2
The only option left that I could think of was to backup and restore each site collection manually.
I knocked up the following powershell script to automate this and it worked …
I needed an easy way to create users in Active Directory.
PowerShell to the rescue … although it didn’t work out.
The PowerShell command New-ADUser depends on AD having web services enabled which is a feature that came out with 2008 R2 – needless to say the AD server I was working with didn’t have this. So I fell back to the good old fashioned command line: dsadd user.
I put together an excel with columns like this:
1
2
3
4
5
6
7
A-Company Name
B-User Prefix
C-First Name
D-Last Name
E-Email Address
F-Password
G-aformula togenerate the command using data inthe row...
I wanted to get node.js and mongoDB up and running on my pi. I’ve got a couple of pet projects which I’m going to tackle and I’ve decided to use the MEAN stack (MongoDB, Express, AngularJS and Node.js). The future, for now, is JavaScript and I’m looking to know enough to make informed decisions about my place in that future.
These are the steps that I followed to get it going …
Before doing this step you want to check what the latest version is – go to http://nodejs.org/dist/ and browse, starting from the biggest number backwards, looking for a release that includes “linux-arm-pi” in the title. That’s the one to use in the following code snippet, for me it was v0.10.24/node-v0.10.24-linux-arm-pi.tar.gz
Ever since google axed their Reader product my news consumption hasn’t been the same. I tried out a few at the time and settled on theoldreader.com but I’ve come to realise that I wasn’t using it like I wanted to – google reader used to be the first thing I loaded whereas theoldreader was loaded only once a week.
I’ve made a switch to feedly to see how that goes instead – first impressions are promising – time will tell.
At the same time I tried out instapaper as I saw that feedly could add articles to that service – my trial was short and the account is now cancelled. I like the idea … but the first few articles I saved all had important images or videos embedded, not something that instapaper is targetting. I’ve resolved to use the feedly “save for later” feature and see how that goes.
After a bit of research I found a product called GateOne that would enable me to use a web browser to connect to ssh using standard https – cool!
Install GateOne
Shell
1
2
3
4
5
6
7
sudo apt-getinstall python-setuptools
git clonehttps://github.com/liftoff/GateOne.git
cdGateOne
sudo python setup.pyinstall
cd..
sudo rm-rf GateOne
sudo gateone
Then ctrl+c so we can edit the config
edit config
Shell
1
sudo vi/etc/gateone/conf.d/10server.conf
at the end of the line with origins, add the IP of the Pi, i.e. , “192.168.0.123” then restart the daemon:
restart daemon
Shell
1
sudo/etc/init.d/gateone restart
to check it out browse to https://192.168.0.123/
All that remains is to ensure it starts automatically on reboot – I think the update-rc.d script must be a bit buggy on the Pi. I ended up doing all of this as I was having some trial and error fun:
start automatically
Shell
1
2
3
4
sudo update-rc.dgateone defaults
sudo update-rc.dgateone start202345.stop80016.
cd/etc/rc2.d/
sudo mvK01gateone S01gateone
Next up – some authentication …
within /etc/gateone/conf.d/20authentication.conf the authenication type was changed to google
authentication
Shell
1
"auth":"google",
and the terminal configuration (/etc/gateone/conf.d/50terminal.conf) was modified to turn off the terminal for all users (allow: false) and then add it back on just for me:
"commands":{"SSH":{"command":"/usr/local/lib/python2.7/dist-packages/gateone-1.2.0-py2.7.egg/gateone/applications/terminal/plugins/ssh/scripts/ssh_connect.py -S '%SESSION_DIR%/%SESSION%/%SHORT_SOCKET%' --sshfp -a 'oUserKnownHostsFile=\\\"%USERDIR%/%USER%/.ssh/known_hosts\\\"'","description":"Connect to hosts via SSH."}},
"commands":{"SSH":{"command":"/usr/local/lib/python2.7/dist-packages/gateone-1.2.0-py2.7.egg/gateone/applications/terminal/plugins/ssh/scripts/ssh_connect.py -S '%SESSION_DIR%/%SESSION%/%SHORT_SOCKET%' --sshfp","description":"Connect to hosts via SSH."}},
"default_command":"SSH",
"dtach":true,
"enabled_filetypes":"all",
"environment_vars":{"TERM":"xterm-256color"},
"session_logging":true,
"syslog_session_logging":false,
"allow":true
}
}
}
Back in /etc/gateone/conf.d/10server.conf I added my external dns to the list of allowed origins and forwarded port 443 on my router to my Pi
After downloading the latest wheezy image from the raspberry pi site and flashing it onto the SD card using Win 32 Disk Imager I transferred the card into the Pi and powered it on. To use my approach it must have both the WiFi usb adaptor and an ethernet cable plugged in.
I then go to my router’s admin page and take a look to see what IP address has been allocated to the Pi’s ethernet link.
Then, using Putty, connect to the ssh using the credentials username: pi password: raspberry (all lowercase).
Once on, the following command were run:
Configure wifi
Shell
1
2
3
sudo apt-getupdate
sudo apt-getinstall wicd-curses
sudo wicd-curses
Then navigate down (using the arrow keys) to my home network, then use the right arrow key to go and configure it. The only thing I put in the configuration was the setting to “Automatically connect” and the key to the network – then pressed F10 to save the config, the Q to quit.
Having done all that I shutdown the pi, unplug the ethernet cable and power it back on.
shutdown
Shell
1
sudo shutdown-hnow
Back in my router’s admin page I can find out the new IP address of the Pi (and reserve it for future if I want).
In one of my C# Windows Forms Applications I had a problem whereby a third-party component was throwing an exception in another thread. The exception wasn’t causing any problems but it wasn’t being handled by anything.
Basically I wanted to catch the exception, log it for reference and possible future investigation, and then ignore it and carry on.
I started by adding event handlers to the exception events: