Sunday, 30 March 2008

Create a SSH Tunnel for Firefox to surf securely

A ssh tunnel for Firefox to a remote computer is good security measure. Especially when connecting via an untrusted network like a wifi hotspot or other public networks. The tunnel encrypts and sends the data to your remote machine then it is sent over the web to your destination. This tutorial assumes you have an account on a remote machine you can ssh into. This is a pretty easy set up.

Now all you need to do is login your remote computer that you have access to with SSH then issue this 1 command

ssh -D 9999 -C me@ipaddress.com

The -D switch - Specifies a local “dynamic” application-level port forwarding. We are also adding the -C switch for compression.

Next we need to put the settings into Firefox.

Firefox> Edit> Preferences> Advanced tab> Network tab> Settings button.

Select Manual proxy configuration

SOCKS Host: localhost Port: 9999

SOCKS v5

No Proxy for: localhost, 127.0.0.1

Note: Sometimes localhost can cause a problem. If your settings are right and it still is not working replace localhost with 127.0.0.1.



Source from here

Read More......

Saturday, 22 March 2008

Howto Setup Vidalia TOR GUI with Ubuntu

Tor is the open source leader to anonymous connections on the internet, you can anonymize your internet presence from AIM/ICQ/MSN/ Jabber/IRC/WWW/FTP and you can even issue a torify command at the command prompt to anonymize your wget/ssh/lynx/ftp/perl or whatever. Basically tor is for the people by the people, it is only alive because we make it so, we can choose to use it freely or use it freely and help it out by running a server on your computer to make the internet safer. Basically tor encrypts your data communications through chained/linked proxies all over the internet.

Vidalia is a cross-platform controller GUI for Tor, built using the Qt framework. Using Vidalia, you can start and stop Tor, view the status of Tor at a glance, and monitor Tor’s bandwidth usage. Vidalia also makes it easy to contribute to the Tor network by helping you set up and manage your own Tor server.

Vidalia runs on most platforms supported by Qt 4.1 or later, including Windows, Mac OS X, and Linux or other Unix variants using the X11 window system.

Prepare your system

sudo apt-get install libevent

Now you need to get the latest tor source code from here

wget http://www.torproject.org/dist/tor-0.2.0.22-rc.tar.gz

tar zxvf tor-0.2.0.22-rc.tar.gz

cd tor-0.2.0.22-rc

./configure

make

sudo make install

Install Vidalia GUI

You need to edit the /etc/apt/sources.list file

sudo gedit /etc/apt/sources.list

add the following lines

deb http://ppa.launchpad.net/adnarim/ubuntu gutsy main
deb-src http://ppa.launchpad.net/adnarim/ubuntu gutsy main

Save and exit the file

Update the source list

sudo apt-get update

Install vidalia

sudo apt-get install vidalia

Once installed press alt F2 and open the run prompt and type in “vidalia” without the quotes, this will start tor, vidalia and you can configure tor/vidalia by right clicking on the tray applet and click on settings, right there you can view all the nodes and choose what to connect to, see node uptimes, os’s and locations with a graphical map.

For web browsing in firefox I prefer using an extention named FoxyProxy it works well with firefox and swiftfox, you can grab this extention directly from here

If you prefer stronger anonymity & protection I strongly Suggest Torbutton for firefox you can download from here

Install the addon and go through the Tor wizard and it will set you up for you and you can view which tor nodes you connect through actively via vidalia

Speed Tweaks for tor

Lets get to editing our torrc so we can improve the speed!

gedit ~/.vidalia/torrc

Paste this at the beginning of the torrc:

# Set the Tor Circuit Build time to find faster tor servers, increments of seconds

CircuitBuildTimeout 2

# connections while Tor is not in use.

KeepalivePeriod 60

# Force Tor to consider whether to build a new circuit every NUM seconds.

NewCircuitPeriod 15

# Set How many entry guards we should we keep at a time

NumEntryGuards 8



Source from here

Read More......

Wednesday, 12 March 2008

Dstat - Versatile resource statistics tool

Dstat is a versatile replacement for vmstat, iostat, netstat, nfsstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting.


Dstat allows you to view all of your system resources instantly, you can eg. compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).

Dstat Features

* Combines vmstat, iostat, ifstat, netstat information and more
* Shows stats in exactly the same timeframe
* Enable/order counters as they make most sense during analysis/troubleshooting
* Modular design
* Written in python so easily extendable for the task at hand
* Easy to extend, add your own counters (please contribute those)
* Includes about 10 external plugins to show how easy it is to add counters
* Can summarize grouped block/network devices and give total numbers
* Can show interrupts per device
* Very accurate timeframes, no timeshifts when system is stressed
* Shows exact units and limits conversion mistakes
* Indicate different units with different colors
* Show intermediate results when delay > 1
* Allows to export CSV output, which can be imported in Gnumeric and Excel to make graphs

Dstat External plugins

Here are the existing plugins

* dstat_app - the most expensive process on the system
* dstat_battery - the percentage of battery charge (needs ACPI)
* dstat_cpufreq - the CPU frequency (needs ACPI)
* dstat_dbus - the number of dbus connections (needs python-dbus)
* dstat_freespace - see the disk usage per partition
* dstat_gpfs - the GPFS read/write IO
* dstat_gpfsop - the GPFS filesystem operations
* dstat_nfs3 - the NFS v3 client operations
* dstat_nfs3op - the extended NFS v3 client operations
* dstat_nfsd3 - the NFS v3 server operations
* dstat_nfsd3op - the extended NFS v3 server operations
* dstat_postfix - counters of the differnt queues (needs postfix)
* dstat_rpc - RPC client calls
* dstat_rpcd - RPC server calls
* dstat_sendmail - counters of the queue (needs sendmail)
* dstat_thermal - CPU temperature
* dstat_utmp - number of utmp sessions (needs python-utmp)
* dstat_wifi - wireless link quality and signal/noise ratio (needs python-wifi)

Install Dstat in Ubuntu

sudo aptitude install dstat

This will complete the installation.

dstat Syntax

dstat [-afv] [-cdgilmnpsty] [-D..] [-I..] [-N..] [delay [count]]

If you want to use dstat just use the following command

dstat

Output looks similar to the following screen

Dstat Examples

Using dstat to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:

dstat -dnyc -N eth0 -C total -f 5

Checking dstat's behaviour and the system's impact on dstat:

dstat -taf --debug

Using the time plugin together with cpu, net, disk, system, load, proc and topcpu plugins:

dstat -tcndylp -M topcpu

this is identical to

dstat -M time,cpu,net,disk,sys,load,proc,topcpu

Using dstat to relate cpu stats with interrupts per device:

dstat -tcyif

Read More......

Friday, 7 March 2008

Howto: Create ISO File From CD/DVD in Ubuntu Gutsy

Have a CD or DVD lying around that you are sick of putting in the drive every time you need something on the disc How about just making an .iso file that you can mount as you need? Or maybe you just want a “master” copy of the media so you can create another copy at a future date.

At any rate it is rather easy to accomplish in Ubuntu:

sudo umount /dev/cdrom dd if=/dev/cdrom of=file.iso bs=1024

You can also do the same with folders:

mkisofs -r -o file.iso /location_of_folder/

Don’t forget to make a checksum:

md5sum file.iso > file.iso.md5

Read More......

Wednesday, 5 March 2008

Monitoring Realtime network interface Using Slurm

slurm started as a pppstatus port to FreeBSD. As I ripped off several functions here is an overview of the features:


* realtime traffic statistics divided into incoming and outgoing
* optional combined view
* can monitor any kind of network interface
* shows detailed statistics about the interface.
* it's themeable (since 0.3.0)
* contact me if you need anything else.

Install slurm in Ubuntu

sudo aptitude install slurm

This will complete the installation.

Slurm Syntax

slurm [-hHz] [-csl] [-d delay] -i interface

If you want to monitor the eth0 network interface use the following command

slurm -i eth0

Output looks similar to the following screen

Read More......