Posts Tagged tip

Comments

Bypassing a restrictive Firewall using SSH

If you are faced with a restrictive firewall implemented by your local admin. But luckily enough to have access to a SSH server! You can use the following tip:

A SOCKS proxy can easily be setup using SSH, in a terminal type:

ssh -D 8080 -Nf your.sshserver.com

Then just change your Browser/Application settings to point towards localhost port 8080

ProxyConf

Comments

Secure Screen Sharing

At home I keep a MacMini Media Center which from time to time I access it remotely. Usually I do this through the SSH Server in OS X. But eventually I might need to access it through a GUI. Here comes in hand Apple’s OS X nifty tool called “Screen Sharing” which is actually a VNC Server/Client. 

You can setup “Screen Sharing” at the same place you setup the SSH Server in “System Preferences -> Sharing” by ticking “Screen Sharing” and “Remote Login” respectively.

Being that my MacMini lies behind my home firewall. I have setup a port forward mechanism for the SSH protocol. As for “Screen Sharing” the solution was to tunnel it through an ssh session in order to secure my connection.

This is very easily accomplished by these simple commands:

On your client run: 

ssh username@home.ip.address -L 5900:localhost:5900

This will establish a SSH tunnel which tunnels all packets from your client 5900 port to your “MacMini” at the same port (5900 is the default port for VNC services). Please note that in this example I’m forwarding port 22 (ssh server) directly from my firewall to my macmini.

Next, it’s time to connect to it using OSX “Screen Sharing” utility. To do this open a terminal and type:

open vnc://localhost/

This will most likely give you a warning “You cannot share your own computer. No worries! Just type in the terminal:

defaults write com.apple.ScreenSharing skipLocalAddressCheck -boolean YES

Launch again the client, and everything should be OK.

Comments

Squid transparent proxy in Ubuntu 8.04

Squid is the defacto proxy system. Either in the lab or at home I use a transparent squid proxy in order to have a global cache system for all my devices (I really hate browser caches that take all you disk space).

For years now, in order to configure a transparent Squid proxy you had to put in the following lines:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

plus the complimentary iptables rules in your router:

iptables -t nat -A PREROUTING -i ethLAN -p tcp -m tcp --dport 80 -j DNAT --to-destination SquidProxy:3128
iptables -t nat -A PREROUTING -i ethWAN -p tcp -m tcp –dport 80 -j REDIRECT --to-ports 3128

But Squid 2.6, which comes in Ubuntu 8.04 (Hardy) no longer supports these and the former 4 lines can be substituted by:

http_port 3128 transparent

Comments

Leopard Terminal

As a switcher I’m several times faced with the awkwardness of the differences between my previous work environment (Linux) and my new one.

One of the most annoying ones has been the handling of the function keys. First I though that after a while I would get used to the mapping in OS X terminal, but then again I still work with too many Linux machines in the Lab, and therefore never really let go of old habits.

The point is therefore:

If you can’t adapt, bind the rules

Here’s the trick for my most annoying key mappings:

Leopard_Terminal_Settings

Go to “Terminal” -> “Preferences”
Pick “Settings”
Pick the desired key and press “Edit”
Change the “action” to “send string to shell” and type the desired ESCAPE sequence

E.g.

  • PageUp = \033[6~
  • PageDown = \033[5~
  • Home = \033[1~

For a full list of ESCAPE sequences refer to here.

Comments

Creating an electronic Curriculum Vitae

Any now and then, one ends up needing to provide a Curriculum Vitae AKA Résumé (CV).
Hat and scroll
Either for applying for a job or just to be used to assert your credentials (for example while running for project fundings), you always end up needing an updated CV.

So what do most people do ?

  • They keep a document of their idea of a CV
  • They keep a document formated using the “Europass standard”
  • They keep it online using services such as LinkedIn

Of course there are other options :)

One of such options (and my favourite) is to use an industry standard XML specification to provide your CV.
My first contact with HR-XML was through a friend that is(was) developing the University Curriculum Vitae Editing/Management System [http://curriculum.ua.pt/]. Ultimately I used the university system to generate the first version of my CV, and from then on I “simply” edit the file and add any new reference.

The lack of an editing tool is nonetheless the most important aspect limiting the mainstream adoption of this standard. But with so many developers around (hint ;) )…

« Previous Entries