UNIX-like Tips and Tricks: find command
The find program is a search utility on Unix-like operating systems. It searches through one or more directory trees of a filesystem, locating files based on some user-specified criteria. By default, find command returns all files below the current working directory. Further, find command allows the user to specify an action to be taken on each matched file. In this article I'll show you some tips for using the find command.
To begin, let's look at the basic structure of the find command:
find start_directory test options criteria_to_match action_to_perform
Example:
In the following command, find will search for any file with the "php" extension in the current directory:
# find . -name "*.php" -print
Print This PostSSH Security Tips – OpenSSH hardening security
In this article I'll show you some tricks to help you securing your OpenSSH service. Here you will find useful information on how to secure sshd and prevent ssh dictionary attack.
1. SSH security by tweaking sshd_config
The OpenSSH server configuration file is located in /etc/ssh/sshd_config. You need to restart sshd after every change you make to that file in order for changes to take effect.
- Change port number
Moving the SSH daemon off of port 22 protects you against automated attacks which assume that sshd is running on port 22.
Port 34912
- Allow only SSH protocol 2
Only SSH protocol version 2 connections should be permitted. Version 1 of the protocol contains security vulnerabilities. The default setting shipped in the configuration file is correct, but it's important to check.
Protocol 2
Print This PostHow To Change MAC Address in Linux, BSD, Unix
Media Access Control address (MAC address) is a unique identifier assigned to most network adapters or network interface cards (NICs) by the manufacturer for identification, and used in the Media Access Control protocol sub-layer. If assigned by the manufacturer, a MAC address usually encodes the manufacturer's registered identification number. It may also be known as an Ethernet Hardware Address (EHA), hardware address, adapter address, or physical address.
1. Change MAC Address in Linux ( CentOS, Debian, Fedora, RHEL, Slackware, SuSE, Ubuntu )
# ifconfig [interface name] down
# ifconfig [interface name] hw ether [new MAC address]
# ifconfig [interface name] up
Example:
# ifconfig eth0 down
# ifconfig eth0 hw ether 1A:2B:3C:4D:5E:6F
# ifconfig eth0 up
FreeBSD: How To Install and Configure SNMP in FreeBSD
Simple Network Management Protocol (SNMP) is a UDP-based network protocol. It is used in network management systems to monitor network-attached devices for conditions that warrant administrative attention.
1. SNMP installation using ports
Install net-snmp using this commands:
# cd /usr/ports/net-mgmt/net-snmp
# make install clean
2. SNMP basic configuration
Copy the default configuration file to the right location.
Print This PostFreeBSD: How To Prevent Users from seeing information about processes owned by others
FreeBSD has inbuilt security measure to disallow users to see processes that are being run under another UID to avoid information snooping. To enable this security feature via sysctl, type the following commands:
sysctl security.bsd.see_other_uids=0 sysctl security.bsd.see_other_gids=0
To enable this security feature on boot, add the following lines to /etc/sysctl.conf:
# Hide UID and GID from other users security.bsd.see_other_gids=0 security.bsd.see_other_uids=0Print This Post
Bandwidth Monitoring Tools for FreeBSD and Linux: nload
Bandwidth in computer networking refers to the data rate supported by a network connection and it represents the capacity of the connection.
nload is a ncurse based network traffic analyser.
nload allow a system administrator to easily monitor the traffic going on its network. It provide both a graph of incoming and outgoing traffic as well as network data transfer statistics.
How To add Extra Repositories in Ubuntu Linux
A software repository is a storage location from which software packages may be retrieved and installed on a computer.
It's very easy to add extra repositories in Ubuntu Linux. In this article I'll show you how to add some useful repositories to your Ubuntu distribution.
First, we have to backup our sources.list by typing in terminal:
# sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
To add extra repositories proceed with the next steps.
Print This PostHow To Set Up a FreeBSD Router – Step-by-Step Tutorial
This tutorial explains how to set up a FreeBSD system that will act as a network router that takes advantage of the ported version of OpenBSD's PF packet filter. A network router is a system that forwards packets from one interface to another.
1. FreeBSD Installation
Install FreeBSD by using this tutorial.
Now that you have FreeBSD installed, lets proceed with the next step.
2. FreeBSD Network Configuration
Open /etc/rc.conf in your favorite editor. You need to add a line for each network card present on the system, for example in our case we'll use two network cards:
Print This Postissues.apache.org got hacked
THE APACHE SOFTWARE FOUNDATION, which coordinates development of the world's most popular web server software, has been the victim of a sophisticated online attack, according to an incident report published by the group.
Read more from the source
Print This PostAndroid: Top 10 Android Applications (1)
It's time to take a look at our favorite free applications that make working and living a lot easier in Android phones. To install any of these applications, open the Android Market on your phone and search for the app by name or use Barcode Scanner.
1. Barcode Scanner
Barcode Scanner is a very useful application which allows you to scan both 1D and QR codes to look up for applications, products and other important information.
Barcode Scanner is an essential app on Android because it offers you extensive ability to look up products and share information in a second.
You will find QR codes at the end of each application so that you can quickly find apps in the Android Market using Barcode Scanner.
Print This Post