Binaya Joshi

Binaya Joshi


All Posts from Binaya Joshi

Administration CentOS Fedora FreeBSD Linux Tips and Tricks

Identify the process that is using some specific port

Sometimes, you may encounter a situation where you see some ports being used by some service, but you cannot exactly determine which application/service is using it. This article talks about how to identifying such services. FreeBSD In the case of FreeBSD, you can use “lsof” command to determine the service that is reserving port as below. lsof -i :199 …

CentOS Fedora

Verify RPM package integrity

In the case of Centos/RedHat OS, RPM tool can be used to verify the integrity of the installed package and check if any of the package has been compromised or not. RPM maintains a local database of all your packages installed in the system. ‘rpm -V packagename’ can be used to test package integrity.  If anything …

Administration FreeBSD Linux Tips and Tricks

Some useful ‘find’ commands

The ‘find’ command is quite useful as it helps to identify files with specific permissions, users,groups, size, etc.  Also, it is quite helpful to as it allows to process its results when combined with other commands. This article talks about some useful ‘find’ commands. Find all files named ‘test.jpg’ inside /home directory             …

Administration CentOS Debian Fedora Linux Ubuntu

Assign range of IP addresses to an interface.

Sometimes you may need to assign a wide range of IP addresses to your network interface in Linux systems. Instead of manually creating aliases for the network interface, it is much quicker to use the network ip range instead. For example, you need to assign the IP range 192.168.10.6 – 192.168.10.100 to your eth0 interface. …

Administration Apache Security Tips and Tricks

Prevent hot linking of images.

Hot linking is displaying an image on a website by linking to the same image on another website, rather than saving a copy of it on the website on which the image will be shown. Lets say, you have an image at www.yourdomain.com/image.jpg and it is not well protected. If someone links this image to …

Administration FreeBSD Linux Tips and Tricks

Setting files as immutable.

Wouldn’t it be nice if we can set files so that even root cannot modify or delete it ? Both FreeBSD and Linux come with commands that allows us to set files as immutable. If you have files that you don’t want anyone to modify/delete by mistake, then these commands are quite useful.   FreeBSD …

Administration CentOS Fedora Linux

Disable SELinux

Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) security mechanism implemented in the Linux kernel. This mechanism adds an extra layer of access security to your files,directories,devices, ports and even processes. I strongly recommend that you implement SELinux in your environment. But, in some cases, you may want to disable it to avoid some …

Administration FreeBSD Linux Security

Scanning for rootkits and possible exploits – RKHunter

Rootkits are malicious softwares that are installed by intruders to gain access to your server once the security of the server has been breached.  Intruders can leave some malicious softwares or back doors in your server to gain permanent access to your server after it has been compromised. Rootkit Hunter (RKHunter) is a Unix-based tool …

Administration Linux

Disk Benchmarking Tools.

One of the main bottlenecks in server slowness is the Disk IO. If the speed of your disks are slow, then the CPUs of your servers may be wasting their CPU cycles waiting for IO operation to be completed. You may have enough CPU and memory, but if the Disk IO operation is slow, still you will …

FreeBSD Linux Tips and Tricks

How to get rid of ^M characters.

When you edit a file in Windows and then open in UNIX, you must have seen ^M characters getting appended in the content. How to get rid of it ? Most UNIX OS come with a utility called ‘dos2unix or dosunix (FreeBSD)’ . If it is not installed, please run following appropriate commands to install …