How to configure Port Address Translation (PAT) on Cisco routers

4 (80%) 1 vote

165 views

cisco

Overview

Port Address Translation (PAT), is an extension to the well known Network Address Translation (NAT) protocol that allows multiple devices on a local area network (LAN) to access Internet resources using a single public IP address. NAT is defined in RFC 1631 and the main purpose of using it was to slow the depletion of public IP address space. A practical use of PAT is for example when an ISP allocates a public IP address for an organization which has many devices which need Internet access. PAT uses private IP address classes defined in RFC 1918 for all inside devices and also uses port numbers to identify the connection. When an internal host wants to communicate with the outside it sends a datagram with its private source address and a random port. The NAT router will then rewrite the source address and port with its public IP and sends the datagram to the requested resource. The response will come back to this same public address and port combination (called a socket) and can be translated back again.

Continue reading…

Understanding file permissions and ownership on Linux

Rate this post

65 views

bash

Overview

The Linux filesystem is based on a hierarchical directory structure where the root mount point is defined by the ‘/’ symbol. In fact everything is a collection of files (files, directories, partitions, pipes, sockets, and hardware devices). Directories are used as containers that list other files. Most Linux distributions follow the Filesystem Hierarchy Standard (FHS) for organizing the filesystem structure. Permissions are used to control who can read, write and execute the contents of a file, and ownership indicates to which username and group a file belongs. If you are working as a system administrator, assigning incorrect permissions or ownership can have serious consequences in terms of security. In this article I will explain the theory and show you how to manipulate them using some practical examples.

Continue reading…

Configuring OpenDKIM to sign Postfix emails

5 (100%) 1 vote

319 views

mail

Overview

DomainKeys Identified Mail (DKIM) is a method used by modern MTAs which allows an organization to sign own emails before delivery. The main purpose of DKIM is to help fight spam by associating a domain name with an mail message. DKIM uses public-key cryptography which allows the sender to electronically sign his emails in a way that can be verified by recipients. The DKIM public key is stored in DNS in order to let receivers verify both the origin and integrity of a message and the private key is used to sign each outgoing message. The DKIM signature is added as a field to the message’s header before delivery. In this article we will implement mail signing using OpenDKIM on Debian Wheezy although this configuration should run fine on any Linux distribution.

Continue reading…

Creating and using swap partitions on Linux

Rate this post

60 views

Linux

Overview

Swap space represents an area on the physical disk (usually a dedicated partition) which holds temporarily a process memory image. This area is often called virtual memory because it allows processes to use memory beyond the physical RAM available on your computer. Swapping and paging algorithms allow processes or portions of processes to move between physical memory and a mass storage device. This frees up space in physical memory.

As the swap space is stored on the disk the access times tend to be slow compared to the RAM. In Linux we can have two types of swap space: a dedicated partition on the physical disk or a swap file which resides among other files on the filesystem. Linux kernels newer that 2.4.10 allow 32 swap areas.

Continue reading…

Customizing and colorizing Linux bash prompt

Rate this post

62 views

bash

Overview

Sometimes you get bored with the way the bash prompt looks like and you want to customize it by adding some useful features or changing colors. The default Bash prompt usually ends with a dollar sign $. Bash itself will show its major and minor version (\s-\v\$), for example, bash-3.00$. Most Linux distributions redefine the prompt to include additional information, such as your current login and computer, which is useful when you’re moving between accounts and computers. In order to customize the bash prompt we need to modify the $PS1 and $PS2 environment variables by our desire.

Bash will use the value of the $PS1 variable for your main prompt. If you include variable names in the string, Bash will substitute the value of the variables into your prompt. Bash has a PS2 (prompt string 2) variable, which is the prompt for incomplete command lines such as when you use a multiline quotation. By default, this prompt is a greater-than sign (>).

Continue reading…

Page 2 of 4123...Last »