tcptrack

A quite handy tool for monitoring tcp traffic is tcptrack. Get it with:

and start it with

the interface parameter -i eth0 must be according to your needs, you can check your interfaces with ifconfig.

There is also tcpdump, tcpflow and other nice tools

Netstat

Sometimes one like to figure out what programs listen at a port. Here we can get an overview with:

Where t=tcp, u=udp, p=show program name, l=show listening ports, n= numeric (not resolve machine names)
The Output could look something like this:

 

lsof

With lsof you can determine easily which program listens on a port and under which user that program runs:

 

Sometimes it happens that you can’t use your services cause they deal with blocked ports. For exampel you use mysql on the commandline and it is by some reason denied. A proxy can help you. Tsocks helps you to use a proxy. Tsocks is a library for intercepting outgoing network connections and redirecting them through a SOCKS server.

install tsocks with

Configure the file /etc/tsocks.conf

and finally call your command like this:

 

 

There is a handy tool for in-depth settings in yout linux, install dconf with:

Open the tool. Now check some interessting paths:

 

ImageMagic is the tool of choice when you have to manipulate images on the command line.

 

You can easily install it from a shell with the following command:

Change all images in the current folder to a with of 800 pixels with a quality of 80%:

Convert a *.gif image to a *.jpg image