Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2017 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/044226151e75d38cf754ee9fc7ddd4c1 to your computer and use it in GitHub Desktop.
Save anonymous/044226151e75d38cf754ee9fc7ddd4c1 to your computer and use it in GitHub Desktop.
Last login: Sun Dec 10 10:18:25 2017 from 10.20.30.2
************ Welcome to NethServer ************
This is a NethServer installation.
Before editing configuration files, be aware
of the automatic events and templates system.
http://docs.nethserver.org
***********************************************
[root@mailserver ~]# db hosts show
autodiscover.mydomain.com=self
Description=
imap.mydomain.com=self
Description=
mail.mydomain.com=self
Description=
smtp.mydomain.com=self
Description=
[root@mailserver ~]# cat /etc/hosts
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
#
# 10localhost
#
127.0.0.1 localhost localhost.localdomain
#
# 20hostname(s)
#
172.16.1.12 mailserver.mydomain.com mailserver smtp.mydomain.com imap.mydomain.com pop.mydomain.com pop3.mydomain.com autodiscover.mydomain.com imap.mydomain.com mail.mydomain.com smtp.mydomain.com
#
# 30hosts_remote
#
#
# 40hosts_local
#
[root@mailserver ~]# cat /etc/dnsmasq.conf
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
#
# 10base
#
# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 1) Allows DHCP hosts to have fully qualified domain names, as long
# as the domain part matches this setting.
# 2) Sets the "domain" DHCP option thereby potentially setting the
# domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
domain=mydomain.com
#
# 20dns
#
# Never forward plain names (without a dot or domain part)
domain-needed
# Using private dns servers, forwarding requests
# Domain is automatically added to simple names in a hosts-file.
expand-hosts
cache-size=4000
#
# 25NameServers
#
# Don't read /etc/resolv.conf. Get upstream servers only from the
# command line or the dnsmasq configuration file.
no-resolv
# Specify IP address of upstream servers directly. Setting this flag
# does not suppress reading of /etc/resolv.conf, use "no-resolv" to do
# that.
server=172.16.1.5
# By default, dnsmasq will send queries to any of the upstream
# servers it knows about and tries to favour servers that are known
# to be up. Uncommenting this forces dnsmasq to try each query
# with each server strictly in the order they appear in
# /etc/resolv.conf
strict-order
# forward RBL queries to localhost unbound
server=/uribl.com/127.0.0.1#10053
server=/dnswl.org/127.0.0.1#10053
server=/spamhaus.org/127.0.0.1#10053
#
# 30dhcp
#
# Enable the DHCP server. Addresses will be given out from the range
# <start-addr> to <end-addr> and from statically defined addresses
# given in dhcp-host options.
# See db configuration getprop dnsmasq DhcpStatus
# Should be set when dnsmasq is definitely the only DHCP server on a
# network.
dhcp-authoritative
# Read dhcp reservations from dhcp-hostsfile.
# See dhcp-hosts option for more informations.
dhcp-hostsfile=/etc/dnsmasq-dhcp-hosts
#
# 40bind
#
except-interface=virbr0
#
# 40mx_record
#
mx-host=mydomain.com,smtp.mydomain.com
#
# 50sssd -- the Samba Domain controller is
# the authoritative DNS for our realm/domain
#
server=/mydomain.com/172.16.1.6
#
# 80tftp
#
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-option=66,"172.16.1.12"
#
# Create Domain wildcard for remote hosts
#
[root@mailserver ~]# nslookup ftp.mydomain.com
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find ftp.mydomain.com: NXDOMAIN
[root@mailserver ~]# yum list nethserver-hosts nethserver-dnsmasq
Loaded plugins: changelog, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
* base: mirror.vimexx.nl
* epel: mirror.serverbeheren.nl
* extras: mirror.netrouting.net
* nethforge: smart-ict.services
* nethserver-base: smart-ict.services
* nethserver-updates: smart-ict.services
* updates: mirror.denit.net
Installed Packages
nethserver-dnsmasq.noarch 1.6.6-1.ns7 @nethserver-updates
nethserver-hosts.noarch 1.2.2-1.ns7 @nethserver-updates
[root@mailserver ~]# exit
logout
=======================================================================
=======================================================================
=======================================================================
Last login: Sun Dec 10 10:13:49 2017 from 10.20.30.2
************ Welcome to NethServer ************
This is a NethServer installation.
Before editing configuration files, be aware
of the automatic events and templates system.
http://docs.nethserver.org
***********************************************
[root@domainserver ~]# db hosts show
alfresco.mydomain.com=remote
Description=
IpAddress=172.16.1.20
autodiscover.mydomain.com=remote
Description=
IpAddress=172.16.1.12
ftp.mydomain.com=remote
Description=
IpAddress=172.16.1.15
imap.mydomain.com=remote
Description=
IpAddress=172.16.1.12
mail.mydomain.com=remote
Description=
IpAddress=172.16.1.12
smtp.mydomain.com=remote
Description=
IpAddress=172.16.1.12
www.mydomain.com=remote
Description=
IpAddress=172.16.1.25
[root@domainserver ~]# cat /etc/hosts
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
#
# 10localhost
#
127.0.0.1 localhost localhost.localdomain
#
# 20hostname(s)
#
172.16.1.5 domainserver.mydomain.com domainserver
#
# 30hosts_remote
#
172.16.1.20 alfresco.mydomain.com alfresco
172.16.1.12 autodiscover.mydomain.com autodiscover
172.16.1.15 ftp.mydomain.com ftp
172.16.1.12 imap.mydomain.com imap
172.16.1.12 mail.mydomain.com mail
172.16.1.12 smtp.mydomain.com smtp
172.16.1.25 www.mydomain.com www
#
# 40hosts_local
#
[root@domainserver ~]# cat /etc/dnsmasq.conf
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
#
# 10base
#
# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 1) Allows DHCP hosts to have fully qualified domain names, as long
# as the domain part matches this setting.
# 2) Sets the "domain" DHCP option thereby potentially setting the
# domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
domain=mydomain.com
#
# 20dns
#
# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv
# Domain is automatically added to simple names in a hosts-file.
expand-hosts
cache-size=4000
#
# 25NameServers
#
# Don't read /etc/resolv.conf. Get upstream servers only from the
# command line or the dnsmasq configuration file.
no-resolv
# Specify IP address of upstream servers directly. Setting this flag
# does not suppress reading of /etc/resolv.conf, use "no-resolv" to do
# that.
server=8.8.8.8
# By default, dnsmasq will send queries to any of the upstream
# servers it knows about and tries to favour servers that are known
# to be up. Uncommenting this forces dnsmasq to try each query
# with each server strictly in the order they appear in
# /etc/resolv.conf
strict-order
#
# 30dhcp
#
# Enable the DHCP server. Addresses will be given out from the range
# <start-addr> to <end-addr> and from statically defined addresses
# given in dhcp-host options.
# See db configuration getprop dnsmasq DhcpStatus
# Should be set when dnsmasq is definitely the only DHCP server on a
# network.
dhcp-authoritative
# Read dhcp reservations from dhcp-hostsfile.
# See dhcp-hosts option for more informations.
dhcp-hostsfile=/etc/dnsmasq-dhcp-hosts
#
# 40bind
#
except-interface=virbr0
#
# 50sssd -- the Samba Domain controller is
# the authoritative DNS for our realm/domain
#
server=/mydomain.com/172.16.1.6
#
# 80tftp
#
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-option=66,"172.16.1.5"
#
# Create Domain wildcard for remote hosts
#
[root@domainserver ~]# nslookup ftp.mydomain.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ftp.mydomain.com
Address: 172.16.1.15
[root@domainserver ~]# yum list nethserver-hosts nethserver-dnsmasq
Loaded plugins: changelog, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
* base: mirror.1000mbps.com
* epel: epel.mirror.wearetriple.com
* extras: mirror.ams1.nl.leaseweb.net
* nethforge: mirror1.nethserver.org
* nethserver-base: mirror1.nethserver.org
* nethserver-updates: mirror1.nethserver.org
* updates: mirror.1000mbps.com
Installed Packages
nethserver-dnsmasq.noarch 1.6.6-1.ns7 @nethserver-updates
nethserver-hosts.noarch 1.2.2-1.ns7 @nethserver-updates
[root@domainserver ~]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment