August 12, 2014

RHEL 6 Synchronize Time Using Other NTP Peers

Introduction

In this blog will I show how to setup a NTP server and perform NTP synchronizing on remote server.

Server Installation

Server Configuration

The server IP is 192.168.1.240 and is located in 192.168.1.0/24 subnet.

Server Firewall

Server Start

Client Installation

Client Start

Client Test

Query your NTP server, but NOT set time. If query return higher stratum than 16, just wait a little and then requery.

Client Set NTP Server

And finally you need to restart ntpd service.

August 10, 2014

RHEL 6 Configure an MTA to Forward (Relay) Email Through a Smart Host.

Introduction

A relay mail server (MTA) is a intermediate server that forwards email to the final delivery mail server (MDA), i.e. writes message to default store /var/spool/mail/${USER}.

Remote Client --> Mail Transfer Agent, MTA (192.168.1.11) --> Mail Delivery Agent, MDA (192.168.1.12)

Configuration MTA

If you want MTA to ONLY transfer mail then set 'mydestination = '. With the above configuration the MTA will delivers local users email from remote client.

Restart service to let configuration take effects.

Check that SMTP port 25 (TCP) is open in iptables. If you need to update the configuration, don't forget to restart iptables service.

Configuration MDA

Do not forget to restart postfix service after configuration changes.

Create ordinary unix user for test, via command adduser mail2.

Check iptables SMTP port 25 (tcp) is open. Update if needed and restart iptables service.

If SELinux is active (default), check that default SELinux boolean for postfix is on.

Test

Now we are ready to test by sending mail from a remote client.

Now verify that mail was delivered on MDA (192.168.1.12).

August 8, 2014

RHEL 6 Postfix Aliases

Introduction

In my previos blog I described to configure and run MTA with postfix. Here I will describe how to make aliases.

Configuration

Start

Create alias

Now to let this take effect you must run the program newaliases.

Test

On remote client send mail to root@san.magnuskkarlsson.com.

And to verify on server.

RHEL 6 Configure a Mail Transfer Agent (MTA) to Accept Inbound Email From Other Systems

Installation

Configuration

Start

Firewall

Add TCP port 25 for SMTP.

Then restart firewall, to let new configuration take effect.

Test

First create a test user on server.

Then on remote client, we use telnet to send mail. For details see http://magnus-k-karlsson.blogspot.se/2014/06/how-to-send-mail-from-command-line-with.html.Here follows a summary.

Now check mail on server.

Reference

  • man 5 postconf

August 7, 2014

RHEL 6 FTP Configure Anonymous-Only Download.

Installation

Configuration

Start

Firewall

Test

Create test data.

And download it from remote host.

RHEL 6 Configure a Caching-Only Name Server to Forward DNS Queries

Installation

Configuration

Start

Test

Firewall