Is a free open source mail transfer agent (MTA). It is easy to administer, fast and as well as the secure MTA.
It’s an alternative to Sendmail, which is the default MTA for RHEL. Well, let us see how to setup a basic local mail server using Postfix, Dovecot and Squirrelmail On CentOS 6.5, although it should work on RHEL, Scientific Linux 6.x series. For this tutorial, I use CentOS 6.5 32 bit minimal installation, with SELinux disabled.
My test box details are given below. OS: CentOS 6.5 32 bit Minimal Installation (fresh installation) IP Address: 192.168.1.101/24 Hostname: server.
Being one of the most popular web servers, Apache has the ease and flexibility of administration. In two steps, we will install Apache onto a CentOS 7 server.
Unixmen.local Prerequisites 1. Remove default MTA sendmail first if it’s already installed. Sendmail will not be installed by default in minimal installation, so you can skip this step. # yum remove sendmail 2. Setup DNS server and add the Mail server MX records in the forward and reverse zone files. To install and configure DNS server, navigate to this.
And you’ll need to contact your ISP to point your external static IP to your mail domain. Add hostname entries in /etc/hosts file as shown below: # vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.101 server.unixmen.local server 4. I disabled SELinux to reduce complexity in postfix configuration. If you want to keep SELinux on, enter the following command in Terminal: # togglesebool httpdcannetworkconnect Note: I didn’t check it and disabled SELinux completely. It was suggested by one of the unixmen regular reader Mr.
I appreciate and thank him for the helpful tip. Install EPEL Repository: We will use Squirrelmail for webmail client. Squirrelmail will not be found on CentOS official repositories, so let us enable EPEL repository. Follow the below link to install and enable EPEL repository. Allow the Apache default port 80 through your firewall/router: # vi /etc/sysconfig/iptables.A INPUT -m state -state NEW -m tcp -p tcp - dport 80 -j ACCEPT. Install Postfix Let us install postfix package using the command: # yum install postfix -y Configuring Postfix Edit /etc/postfix/main. Cf, # vi / etc/postfix/main.
Configure and Use FirewallD It’s recommended to start using Firewalld instead of iptables as this may discontinue in future. However, iptables is still supported and can be installed with YUM command. We can’t keep Firewalld and iptables both in same system which may lead to conflict. In iptables, we used to configure as INPUT, OUTPUT & FORWARD CHAINS but here in Firewalld, the concept which uses Zones. By default, there are different zones available in firewalld, which will be discussed in this article. The basic zone which are like public zone and private zone. To make things work around with these zones, we need to add the interface with the specified zone support and then we can add the services to firewalld.
By default, there are many services are available, one of the best feature of firewalld is, it comes with pre-defined services and we can take these services as example to add our services by simply copying them. Firewalld works great with IPv4, IPv6 and Ethernet bridges too. We can have the separate run-time and permanent configuration in firewalld. Let’s get started how to work with zones and create our own services and much more exciting usage of firewalld. Our Testing Environment Operating System: CentOS Linux release 7.0.1406 (Core) IP Address: 192.168.0.55 Host-name: server1.tecmintlocal.com.
Disable Iptables Service Stpe 2: Discussing Firewalld Components 3. Before heading up for firewalld configuration, I would like to discuss about each zones. By default there are some zones available. We need to assign the interface to the zone. A zone define that the zone was trusted or denied level to the interface to get connection.
A zone can contain services & ports. Here, we’re going describe each zones available in Firewalld. Drop Zone: Any incoming packets are dropped, if we use this drop zone. This is same as we use to add iptables -j drop. If we use the drop rule, means there is no reply, only outgoing network connections will be available. Block Zone: Block zone will deny the incoming network connections are rejected with an icmp-host-prohibited. Only established connections within the server will be allowed.
Public Zone: To accept the selected connections we can define rules in public zone. This will only allow the specific port to open in our server other connections will be dropped. External Zone: This zone will act as router options with masquerading is enabled other connections will be dropped and will not accept, only specified connection will be allowed.
DMZ Zone: If we need to allow access to some of the services to public, you can define in DMZ zone. This too have the feature of only selected incoming connections are accepted. Work Zone: In this zone, we can define only internal networks i.e. Private networks traffic are allowed. Home Zone: This zone is specially used in home areas, we can use this zone to trust the other computers on networks to not harm your computer as every zone. This too allow only the selected incoming connections.
Internal Zone: This one is similar to work zone with selected allowed connections. Trusted Zone: If we set the trusted zone all the traffic are accepted. Now you’ve better idea about zones, now let’s find out available zones, default zones and list all zones using the following commands.
![Centos Centos](http://www.server-world.info/en/CentOS_7/zimbra/img/1.png)
# firewall-cmd -get-zones. We are running the old NIS with ypserv & ypbind. We have these rules but it appears we are missing something else as this fails with: ypinit -s IP Can’t enumerate maps from IP.
Please check that it is running. Any other suggestions? # firewall-cmd -list-all public target: default icmp-block-inversion: no interfaces: sources: services: ssh mdns dhcpv6-client nfs mountd smtp https http rpc-bind dns samba samba-client ports: 944/tcp 945/tcp 945/udp 946/udp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules. Hi Babin, I would like to transfer this below iptables rule to allow incoming nfs connection (example to allow only from 172.16.10.0/24 network) into the firewalld rule, how to get correct or equivalent in the firewalld?