Documentos de Académico
Documentos de Profesional
Documentos de Cultura
DNS
-SERVIDOR (Slave)
IP = 192.168.10.2/24
Hostname = secundarydns.informatica.local
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8)
DNS
// server as a caching only nameserver (as a localhost DNS resolver
only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration
files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about
the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { 127.0.0.1; 192.168.10.2; };
# listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; 192.168.10.0/24; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT
enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you
need to enable
recursion.
- If your recursive DNS server has a public IP address, you
MUST enable access
control to limit queries to your legitimate users. Failing to
do so will
cause your server to become part of large scale DNS
amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
zone "." IN {
type hint;
file "named.ca";
};
zone "informatica.local" IN {
type slave;
file "slaves/informatica.fwd";
masters { 192.168.10.1; };
};
zone "10.168.192.in-addr.arpa" IN {
type slave;
file "slaves/informatica.rev";
masters { 192.168.10.1; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Createdsymlinkfrom/etc/systemd/system/multiuser.target.wants/nam
ed.service to /usr/lib/systemd/system/named.service.
informatica.fwd informatica.rev
YPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=5c0bd73b-4f4f-4b21-990c-0d46c25f7771
DEVICE=ens33
ONBOOT=no
IPADDR=192.168.10.2
PREFIX=24
DNS1=192.168.10.1
DNS2=192.168.10.2
GATEWAY=192.168.10.1
ZONE=public
# Generated by NetworkManager
nameserver 192.168.10.1
nameserver 192.168.10.2
Server: 192.168.10.1
Address: 192.168.10.1#53
Name: informatica.local
Address: 192.168.10.2
Name: informatica.local
Address: 192.168.10.4
Name: informatica.local
Address: 192.168.10.3
Name: informatica.local
Address: 192.168.10.1
CLIENTE (client1)
Primeramente poner una IP estática a la maquina: 192.168.10.3
1. Agregamos los detalles de los servidores DNS en
resolv.conf
[root@client1 ~]# vi /etc/resolv.conf
-SERVIDOR (Mail)
IP = 192.168.10.100/24
Hostname = mail.informatica.local
5. Instalamos Postfix
Usando telnet
[root@localhost ~]#cat
/home/test/Maildir/new/1469380254.Vfd00I315cb1M394920.mail.informatica.l
ocal
Return-Path: <root@informatica.local>
X-Original-To: mabel@informatica.local
Delivered-To: mabel@informatica.local
Received: by mail.informatica.local (Postfix, from userid 0)
id 688F72420178; Sun, 24 Jul 2016 18:22:01 -0500 (ECT)
Date: Fri, 19 Jul 2019 18:22:01 -0500
To: mabel@informatica.local
Subject: Prueba
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20160724232201.688F72420178@mail.informatica.local>
From: root@informatica.local (root)
Mensaje de prueba
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user mabel ## Ingrese el usuario al que se envió el correo
+OK
pass Mabel ## La contraseña del usuario
+OK Logged in.
list ## Lista los mensaje que tiene el usuario
+OK 1 messages:
1 579
retr 1 ## Para ver el correo
+OK 579 octets
Return-Path: <root@informatica.local>
X-Original-To: test@informatica.local
Delivered-To: test@informatica.local
Received: by mail.informatica.local (Postfix, from userid 0)
id 51B8221E3FF8; Fri, 19 Jul 2019 13:51:43 -0500 (ECT)
Date: Fri, 19 Jul 2019 13:51:43 -0500
To: test@informatica.local
Subject: Prueba
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20160724185143.51B8221E3FF8@mail.informatica.local>
From: root@informatica.local (root)
Mensaje de prueba
.
quit ## Para salir
+OK Logging out.
Connection closed by foreign host.
CLIENTE 2
Escenario:
IP: 192.168.10.4
Hostname: client2.infomatica.local
search informática.local
nameserver 192.168.10.1
Server: 192.168.10.1
Address: 192.168.10.1#53
100.10.168.192.in-addr.arpa name = mail.informatica.local.
Seguimos los mismos pasos para acceder al correo del usuario Oli en
Evolution
[root@localhost]# vi /etc/openvpn/client.ovpn
5. Ejecutamos el archivo .ovpn que creamos
[root@localhost]# ifconfig