How To Monitor Network Traffic by Process under Linux
NetHogs is a small network monitoring tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which process is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth.
To install NetHogs under CentOS, Fedora, RHEL, enter:
yum install nethogs
To install NetHogs under Debian and Ubuntu, enter:
apt-get install nethogs
The default network interface to monitor is eth0. If you wish to use other device, simply type the argument after nethog, open the terminal and run the following command:
Print This PostUNIX Tools: mytop – MySQL Monitoring Tool
MyTop is a console-based tool for monitoring the threads and overall performance of a MySQL server. It runs on most Unix systems. MyTop is a top clone for MySQL Server.
To install MyTop under FreeBSD, enter:
make install clean -C /usr/ports/databases/mytop
To install MyTop under CentOS, Fedora, RHEL, enter:
yum install mytop
To install MyTop under Debian, Ubuntu, enter:
sudo apt-get install mytop
Print This Post
SSH Security: How To Block SSH Brute Force Attacks with SSHGuard
SSHGuard monitors logging activity and reacts to attacks by blocking their source IP addresses. sshguard has born for protecting SSH servers from the today's widespread brute force attacks, and evolved to an extensible log supervisor for blocking attacks to applications in real-time.
SSHGuard is given log messages in its standard input. By means of a parser, it decides whether an entry is normal activity or attack. After a number of attacks, the IP address is blocked with the firewall.
These are the available blocking backends:
- SSHGuard with PF (OpenBSD, FreeBSD, NetBSD, DragonFly BSD)
- SSHGuard with IP FILTER (FreeBSD, NetBSD, Solaris)
- SSHGuard with IPFW (FreeBSD, Mac OS X)
- SSHGuard with netfilter/iptables (Linux)
- SSHGuard with TCP wrappers / hosts.allow (almost any UNIX system)
FreeBSD: How To fetch the ports from fast servers
Ports randomly gets it's source server list from bsd.sites.mk file located in /usr/ports/Mk/, as defined by the port maintainer. Most of the time downloading the source takes a long time if the remote server is not physically near to us.
In this case, we can tune the ports so that it fetches the sources from the nearest server. A nearer server normally means less latency and a faster connection.
The port fastest_sites will test the latency of the servers listed in /usr/ports/Mk/bsd.sites.mk. The file is suitable to be included in /etc/make.conf which tell ports where to fetch the sources from.
Print This Post