SlideShare a Scribd company logo
1 of 12
Servidor DNS con Ubuntu Server en VirtualBox


Creamos a máquina virtual no VirtualBox




Poñemos o adaptador de rede coma Bridge




Instalamos o Ubuntu Server
Arrincamos o Ubuntu Server por primeira vez.
Nome de usuario: jose
Password: abc
O primeiro que facemos é configurar o servidor como estático, porque agora está como DHCP.
Miramos cal é a IP asignada á nosa interfaz polo sistema con ifconfig eth0


que resulta ser 192.168.0.104




Editamos o arquivo de configuración das interfaces




Os cambios:




Como nome do servidor poñemos a propia máquina, 127.0.0.1
A porta de enlace é o modem ó que estamos conectados.

Reiniciamos o servicio de rede:




Se agora miramos a arquivo /etc/resolv.conf vemos que estase a empregar o servidor que acabamos
de definir, 127.0.0.1:
Vou cambiar o hostname


Agora o host do server chámase servidorubuntu.
É imprescindible que tamén cambio o nome no arquivo /etc/hosts




127.0.1.1 é a dirección de bucle interno e debe apuntar ó noso servidor.




Xa teño instalado o Bind9, o programa que nos vai facer de servidor DNS, porque na instalación do
Ubuntu Server elixín o paquete DNS server, e ven incluído nel.
Se o quixeramos instalar, simplemente con sudo apt-get install bind9:
Unha vez instalado o Bind, debemos configuralo.
Editamos o arquivo de configuración /etc/bind/named.conf.options


Puxen como dous primeiro as DNS que me proveeu o meu ISP, e logo as dúas de google




Edito o arquivo /etc/bind/named.conf.local

Os cambios:

                                                  A primeira parte é a resolución directa.
                                                  A segunda, a inversa.




Agora temos que crear os dous arquivos que van ser a base de datos do servidor DNS,
db.daw.net e db.192.168.0




servidorubuntu. : hostname do servidor
SOA: autoridade da zona
NS: servidor de nomes
A: dirección de resolución directa (nomes de dominio -> direccións IPv4)
@ substitúe ó nome de dominio para o cal estou configurando o DNS

Agora reinicio o bind:


Antes de continuar comprobo que non hai ningún erro de sintaxis no arquivos de configuración:

E comprobo a zona que acabo de crear no arquivo db.daw.net:

De momento OK:
Podo comprobar que funciona a resolución directa con dig:
Probando ca meu dominio:




Ou con lalin.org:




En cambio se comprobo agora a resolución inversa dará erro, porque inda no creei o arquivo
(db.192.168.0)
Agora vou crear o arquivo db.192.168.0 en /etc/bind

A primeira parte é idéntica ó arquivo db.daw.net




PTR : punteiro ou rexistro inverso (direccións IP -> nomes de dominio)
104 : a dirección host do servidor (192.168.0.104)



E comprobo a zona que acabo de crear no arquivo db.192.168.0:


OK



Volvo reiniciar o Bind:




E agora sí debería funcionar a resolución inversa

OK
Probamos tamén a resolución inversa ca IP de www.lalin.org




Podemos comprobar que resolve ben tamén con nslookup:




a inversa:




Podemos usar host para coñecer a dirección dun dominio:
Configuración do cliente Ubuntu

Tan só nos queda configurar un cliente.
Empregarei como cliente un Ubuntu 32bit en VirtualBox, ca tarxeta de rede en modo bridge.
Este Ubunto ten modo gráfico, non como o Server;
pero empregarei a consola.
Primeiro configuramos a interfaz de rede eth0:


Configuro a interfaz de rede do cliente como estática,
con IP 192.168.0.150, máscara 255.255.255.0, porta de enlace o router, 192.168.0.1
e por último a IP do servidor DNS e o dominio.




Logo o arquivo de configuración resolv.conf


que quedaría así:



Reiniciamos a rede


Para comprobar que efectivamente funciona, probamos lookup no cliente:




e ca resolución inversa:
Probamos con dig:
Resolución directa




Resolución inversa:
En tódolos casos aparece o noso servidor Ubuntu DNS server 192.168.0.104.

¿Qué pasa se apago o servidor DNS?




Resolveríase fácil simplemente poñendolle algún servidor DNS alternativo ó cliente.


Imaxe final:
. á esquerda o cliente ( Ubuntu 32) executando nslookup na console e co Firefox en google.es
. á dereita o servidor DNS (Ubuntu Server 32 despregamento)
. debaixo o VirtualBox mostrando as dúas máquinas virtuais
Instalación e configuración dun servidor DNS mediante Ubuntu Server en VirtualBox

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Instalación e configuración dun servidor DNS mediante Ubuntu Server en VirtualBox

  • 1. Servidor DNS con Ubuntu Server en VirtualBox Creamos a máquina virtual no VirtualBox Poñemos o adaptador de rede coma Bridge Instalamos o Ubuntu Server
  • 2. Arrincamos o Ubuntu Server por primeira vez. Nome de usuario: jose Password: abc
  • 3. O primeiro que facemos é configurar o servidor como estático, porque agora está como DHCP. Miramos cal é a IP asignada á nosa interfaz polo sistema con ifconfig eth0 que resulta ser 192.168.0.104 Editamos o arquivo de configuración das interfaces Os cambios: Como nome do servidor poñemos a propia máquina, 127.0.0.1 A porta de enlace é o modem ó que estamos conectados. Reiniciamos o servicio de rede: Se agora miramos a arquivo /etc/resolv.conf vemos que estase a empregar o servidor que acabamos de definir, 127.0.0.1:
  • 4. Vou cambiar o hostname Agora o host do server chámase servidorubuntu. É imprescindible que tamén cambio o nome no arquivo /etc/hosts 127.0.1.1 é a dirección de bucle interno e debe apuntar ó noso servidor. Xa teño instalado o Bind9, o programa que nos vai facer de servidor DNS, porque na instalación do Ubuntu Server elixín o paquete DNS server, e ven incluído nel. Se o quixeramos instalar, simplemente con sudo apt-get install bind9:
  • 5. Unha vez instalado o Bind, debemos configuralo. Editamos o arquivo de configuración /etc/bind/named.conf.options Puxen como dous primeiro as DNS que me proveeu o meu ISP, e logo as dúas de google Edito o arquivo /etc/bind/named.conf.local Os cambios: A primeira parte é a resolución directa. A segunda, a inversa. Agora temos que crear os dous arquivos que van ser a base de datos do servidor DNS, db.daw.net e db.192.168.0 servidorubuntu. : hostname do servidor SOA: autoridade da zona NS: servidor de nomes A: dirección de resolución directa (nomes de dominio -> direccións IPv4) @ substitúe ó nome de dominio para o cal estou configurando o DNS Agora reinicio o bind: Antes de continuar comprobo que non hai ningún erro de sintaxis no arquivos de configuración: E comprobo a zona que acabo de crear no arquivo db.daw.net: De momento OK:
  • 6. Podo comprobar que funciona a resolución directa con dig: Probando ca meu dominio: Ou con lalin.org: En cambio se comprobo agora a resolución inversa dará erro, porque inda no creei o arquivo (db.192.168.0)
  • 7. Agora vou crear o arquivo db.192.168.0 en /etc/bind A primeira parte é idéntica ó arquivo db.daw.net PTR : punteiro ou rexistro inverso (direccións IP -> nomes de dominio) 104 : a dirección host do servidor (192.168.0.104) E comprobo a zona que acabo de crear no arquivo db.192.168.0: OK Volvo reiniciar o Bind: E agora sí debería funcionar a resolución inversa OK
  • 8. Probamos tamén a resolución inversa ca IP de www.lalin.org Podemos comprobar que resolve ben tamén con nslookup: a inversa: Podemos usar host para coñecer a dirección dun dominio:
  • 9. Configuración do cliente Ubuntu Tan só nos queda configurar un cliente. Empregarei como cliente un Ubuntu 32bit en VirtualBox, ca tarxeta de rede en modo bridge. Este Ubunto ten modo gráfico, non como o Server; pero empregarei a consola. Primeiro configuramos a interfaz de rede eth0: Configuro a interfaz de rede do cliente como estática, con IP 192.168.0.150, máscara 255.255.255.0, porta de enlace o router, 192.168.0.1 e por último a IP do servidor DNS e o dominio. Logo o arquivo de configuración resolv.conf que quedaría así: Reiniciamos a rede Para comprobar que efectivamente funciona, probamos lookup no cliente: e ca resolución inversa:
  • 10. Probamos con dig: Resolución directa Resolución inversa:
  • 11. En tódolos casos aparece o noso servidor Ubuntu DNS server 192.168.0.104. ¿Qué pasa se apago o servidor DNS? Resolveríase fácil simplemente poñendolle algún servidor DNS alternativo ó cliente. Imaxe final: . á esquerda o cliente ( Ubuntu 32) executando nslookup na console e co Firefox en google.es . á dereita o servidor DNS (Ubuntu Server 32 despregamento) . debaixo o VirtualBox mostrando as dúas máquinas virtuais