Tunneling SSH over an HTTP-Proxy Server

1) Get corkscrew

2) Add ProxyCommand to your ~/.ssh/config file:

Host *
  ProxyCommand corkscrew http-proxy.example.com 8080 %h %p

You must change “http-proxy.example.com” with the real proxy address and replacing 8080 with the port on which the proxy listens.

The %h and %p will be replaced automatically by SSH with the actual destination host and port.

3) If the proxy requires authentication, you should change the proxycommand line with:

Host *
 ProxyCommand corkscrew http-proxy.example.com 8080 %h %p ~/.ssh/proxyauth

The ~/.ssh/proxyauth file contains the proxy user credentials according with the following syntax:

user:pass
Posted in howto, networking | Tagged , | Leave a comment

VLC choppy playback on mkv files

Try to do the following operations:

  1. Go to Preferences -> Input/Codec -> other codecs -> FFmpeg
  2. Change the “Skip the loop filter for H.264 decoding” option to All. This option makes playback smoother by slightly degrading the quality of the picture. You can try the other settings first, and only use this as a last resort.

Hopefully this tip will solve your problem.

Posted in tips | Leave a comment

Apple Macbook: No airport card installed

Today when i booted my Apple Macbook 2 Ghz with Mac OS X 10.5.7 installed, i noticed that there was no wireless connection and the wireless status icon said: “No airport card installed“.

Scouting on google i found this article about Resetting PRAM and NVRAM and a solved the problem.

Continue reading

Posted in macosx | Tagged | Leave a comment

Handling svnserve with SMF in Solaris 10

It would pritty nice to handle svnserve with the Solaris 10 Service Management Facility.

Let’s start by installing the svnserve package (I got it from blastwave).

Then we need the manifest XML file and the method script:

Continue reading

Posted in solaris | Tagged , | Leave a comment

Chroot Bind 9 with Solaris 10 SMF

In Solaris 10 the BIND service does not run in a chroot environment by default. To remedy this security risk we will create another BIND SMF service instance which will execute named in a safe manner. The following configuration works also in non-global zones.

Continue reading

Posted in solaris | Tagged , | 2 Comments

pkgdep – Display Solaris package’s dependencies

When i was giving a lesson about Solaris i suggested to write a shell script to find package dependencies. So while the students were basking on this exercise, i wrote my pkgdep.sh. The help message is self-explanatory about the usage:

Continue reading

Posted in solaris | Tagged | Leave a comment

Determine CPU and Platform Informations on Solaris

Solaris has a lot of tools to gather hardware informations. Regarding the processor and platform:

  • psrinfo
  • isainfo
  • isalist
  • optisa

Continue reading

Posted in solaris | Tagged | Leave a comment

Locate countries of IP addresses with Perl and GeoIP

Today when i was trying to compile amule on Solaris 10 i found a dependency to MaxMind’s GeoIP. GeoIP allows you to locate the country of an IP address or domain name.

When i found the perl bindings i decided that i must play with this another unuseful stuff. With Geo::IP perl module is a very quick & easy stuff:

use Geo::IP;
my $gi = Geo::IP->new(GEOIP_STANDARD);
print $gi->country_code_by_addr(’208.77.102.203′);
print $gi->country_name_by_name( “zorzorz.net”);

Watch the results with this example!

Posted in perl | Leave a comment

Shell Scripting and filename completition with Vim

Filename completition is a great technique, to complete a filename in vim is very easy, just type Ctrl-X followed by Ctrl-F complete the filename under cursor.

Vim filename completition may be problematic in shell scripting, the motivation is that in shell scripting often you have some variable assignment like this:

PATH=/bin:/usr/bin:/home/lorenzo/bin

The problem is that the character ‘=’ is a valid filename character. So you must remove from the list of valid filename character by setting the following option:

set isfname-==

Posted in shell, tips, vim | Leave a comment

dhclient overwrites your /etc/resolv.conf

Create the file /etc/dhclient-enter-hooks and put the following line:

make_resolv_conf() {}

Posted in linux, networking, tips | Leave a comment