Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, 22 May 2008

Add Facebook chat to Pidgin

After using Digsby happily for some time I have have realised the main limitation, no portable version. I have been going through my 'Portable Apps' collection and rediscovered Pidgin. One of the few things that held me back from moving back to Pidgin was its lack of Facebook chant support. Thankfully this issue seems to have been solved thanks to the hard work of 'eionrobb' over at Google Code.

Click the 'Read More' for the full article.


They have published a pidgin-facebook plugin for both Windows and Linux. I have installed this and so far it is working with Facebook chat as advertised. Simply downloads the plugin for your platform (and the corresponding icons) and install to your plugin folder.

With the additional announcement on the Adium blog that they have successfully integrated Facebook chat into Adium, that seems to have Mac, Windows and Linux covered.

I have been looking forward to the release of Digsby for the Mac, but now that Adium and Pidgin have Facebook support I am struggling to justify changing my IM client of choice.

The only place I can't log into Facebook chat now is my mobile - any chance of an update from Fring?


Read more!

Sunday, 24 February 2008

.Mac / Socks-Proxy / MarcoPolo

Google .Mac

Google have released some information on there google-code site about a replacement dotmac service. After playing around with this for a day I managed to get it up and running on my Ubuntu server, mostly thanks to the excellent step by step instructions given in the Distro specific guide.

However, in addition I have written the script outlined below to update my hosts file on my mac to allow me to mount my idisk from anywhere, even though I use dyndns rather than a fixed IP. When combining this with my 'secure' ssh tunneling method when I am not at home give me a relatively secure idisk setup.

Script:

# this program should work out the IP address of the server and add it to /etc/hosts in
# the right place!
#
# find the ip address
rm /Users/Admin/.ip.1
ping -c 1 my.dyndnsdomain.com >> /Users/Admin/.ip.1
#
#
# assign it to DOTMACIP
DOTMACIP=$(grep from /Users/Admin/.ip.1 | grep -o 8...........)
#
#
# clear old .temphosts file
rm /Users/Admin/.temphosts
touch /Users/Admin/.temphosts
#
# output the contents of hosts file
echo "
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
#
#
127.0.0.1 localhost

" >> /Users/Admini/.temphosts

echo "$DOTMACIP www.mac.com syncmgmt.mac.com idisk.mac.com configuration.apple.com lcs.mac.com certinfo.mac.com delta.mac.com notify.mac.com publish.mac.com homepage.mac.com" >> /Users/Admin/.temphosts
#
echo "$DOTMACIP www.mac.com. syncmgmt.mac.com. idisk.mac.com. configuration.apple.com. lcs.mac.com. certinfo.mac.com. delta.mac.com. notify.mac.com. publish.mac.com. homepage.mac.com." >> /Users/Administrator/.temphosts
#
#
# copy the new file to the right place
mv /etc/hosts /etc/hosts.old
cp /Users/Admin/.temphosts /etc/hosts
#
# should be the end!
----------------------------

Mac, ssh, socks proxy and MarcoPolo

Having set up my idisk I began to wonder about the security of my internet connection in general. As I run my own Linux server (Ubuntu 7.10) I thought it should be relatively straight forward to secure my web browsing etc when away from home.

To this end I decided to play around with my Mac to see if I could establish a secure web surfing environment when out and about. It was a relatively simple thing to setup a ssh connection to my home server which would provide a port on the localhost which I could use as a socks proxy for firefox.

ssh -v -ND (the local port to use, I went with 8080) -p (your ssh port) user@your_server.com

This etablished a port (8080) on the local machine I was able to direct Firefox to (in the network settings under proxies, socks proxy > localhost 8080) to secure my web browsing. FYI the -v makes the session verbose, so I can see what is happening, the -ND specifies that I don't want to open an interactive ssh session and that the port (8080) is dynamic so responds appropriately to whichever port the application is looking for.

This worked great for firefox but I soon realised that all the other Internet activity, my google notifier, my idisk etc, where not going through this 'secure' tunnel. as a solution to this I went to the Mac's network settings and created a new location called 'Secure'. Here, under the airport settings I was able to specify a socks proxy (under the proxy settings) with a port of 8080. This then ensured that all my Mac's network traffic (at least that going through the Airport) was using the 'secure' tunnel.

However, this was quite alot to change every time I wanted to use the 'Secure' connection. My first thought was to try and learn a bit of applescript to automate this process. But I found an excellent piece of donationware called MarcoPolo which solved the problem for me and gave me some extra functionality I didn't even know I needed!

With MarcoPolo I was able to specify conditions under which it automatically switched the network location between secure and home (my home settings, yes, I don't have an imagination). Additionally I put the ssh command into a shell script so that MarcoPolo would switch over the network location and run setup the ssh tunnel whenever I connected to a particular wireless network, as identified by the SSID. Obviously I will have to set this up for each wireless network I use outside of my home network, however, you only need to specify that the network should trigger the 'secure' environment, rather than each individual action for each network which makes life easier.

In addition to that I have been able to setup Marcopolo to automatically mount my samba shares when I am at home and set the correct default printer for me depending on my location. Now I wounder how I lived doing all these things manually!

Note: Yes, I realise that the connection from my Ubuntu server to the Internet is not secure!

Note 2: I haven't found a good way on embedding links with my current editing method, so they are listed below.

Useful Links:

http://code.google.com/p/dotmac/ - Google dot.Mac
http://code.google.com/p/dotmac/wiki/OS_specific_notes - the distro specific guide for Ubuntu
http://www.symonds.id.au/marcopolo/ - MarcoPolo
http://
www.mozilla.com/firefox/

Read more!

Friday, 24 August 2007

The Encrypted Desktop

Whether you are obsessed with security or simply need a way to 'get round' your companies firewall restrictions there are a number of ways to encrypted your data or use a proxy to avoid firewall problems.

The process I finally decided upon seemed to be both the easiest or simplest for my needs. One point to make is that I happen to have a Linux server (Ubuntu if anyone cares) running at home. This played an important part in my decision and the process I use would be impossible without it (unless you know someone who will let you use theirs).

The next thing to sort out is what kind of operating system you are wanting to use these services from. The process will differ depending on your OS, for this post I will concentrate on Windows users. The 1st bit of kit you will need is an external Linux server to use as a 'proxy'. You will need the IP or web address of the server and you will need the SSH authentication details. Setting up OpenSSH falls outside the scope of this post, if you need any help Google is your friend. Then you will need the software to connect to the server, for this I suggest Putty. Personally I use PortaPutty (from here or PuttyTray) as this means I can carry the whole system on a USB key.

Once you have Putty, whether the full client or one mentioned above you need to open the Tunnels pane under SSH (under Connections) on the left hand list. The simplest thing to do here is to enter 8080 (or a similar unused port number) into the Source Port box and select 'Dynamic' under Destination. Once you click Add it should appear as D8080 in the box above. Once you have done this you must return to 'Sessions' at the top of the list on the left. From here you can add in the details of your server, by host name or IP address and name the settings in the Saved Sessions box. One note before you click Save, below the save box (if you are using PuttyTray) is the option to use sessions from the registry or from a file. Before you save change this to "Session from file". It is also worth remembering that this reverts back to "Session from registry" each time it is restarted so you will have to change this each time to retrieve your settings. Of course if you don't mind your details being stored in the registry you can skip this step.

The basic setup for putty is complete. From here you simply select Open and enter your user name and password when prompted. If you intend to use the SSH session itself you can do so now. If you don't want to use the shell session you can change a few options in Putty to make it non interactive. From the SSH menu on the left (under connections) you can select 'Don't start a shell or command at all'. This will load up your tunnel without any interactivity in the shell window itself. Simply close the window to shutdown the shell and the tunnel (NOTE: remember if you close the shell the programs using the tunnel will no longer be able to access the internet).

Once you have completed the setup of Putty all that remains is to tell each of your programs that need the SSH tunnel that is exists. For example in Firefox (again I use Portable Firefox) or Thunderbird go to the Tools > Options > Advanced > Network and under Connections hit Settings. From here select 'Manual proxy configuration', under SOCKS Host enter localhost with 8080 in the Port box (or whichever port you entered in the source Port in Putty). Select SOCKS v5 and click OK and OK again. Now when you open Firefox (or Thunderbird) it will use the SSH tunnel provided by Putty. One way to test if it is working is to try to open a website in Firefox without Putty running. This should result in a 'Page can not be displayed' error which is then resolved once Putty is running and connected to your SSH host.

Remember the SSH session will not shut down while the Tunnel is still in use, you must close all programs using the tunnel then it will quit automatically (assuming you have logged out of the shell).

That is about it, you can configure any service which allows you to use a proxy to use this tunnel, for example I run Firefox, Thunderbird, Pidgin and FileZilla through mine.

It is also worth noting that this is a 'convenient' way to ensure you are safe and secure when using public wireless hotspots.


Some useful sites:

Portable Apps - for Portable Applications such as Firefox, Thunderbird, Pidgin etc

Lifehacker - for info on how proxy's work

Mac Geekery - How to for a Mac

Stop Design - Another how to for the Mac using SSH Tunnel Manager
Read more!