Skip to main content

DNS Server configuration on Solaris/Linux/Unix system


mkdir -p/usr/local/bind-9.8.1-P1/var/named
mkdir -p /usr/local/bind-9.8.1-P1/var/cache
mkdir /usr/local/bind-9.8.1-P1/var/run/named
chown bind:bind /usr/local/bind-9.8.1-P1/var/run/named/
chmod g+w /usr/local/bind-9.8.1-P1/var/run/named/
chmod g+w /usr/local/bind-9.8.1-P1/var/cache
chmod g+w /usr/local/bind-9.8.1-P1/var/named
cd /usr/local/
ln -s bind-9.8.1-P1/ bind
adduser —home /usr/local/bind/var/named —shell /bin/bash —disabled-password—disabled-login bind
cp /home/usuario/.bashrc /usr/local/bind/var/named/
cp /home/usuario/.profile /usr/local/bind/var/named/
chown -R bind:bind /usr/local/bind/var/named/
adduser bind staff
chgrp staff /usr/local/src
chmod g+w /usr/local/src
su - bind
cd /usr/local/src/
wget http://ftp.isc.org/isc/bind9/9.8.1-P1/bind-9.8.1-P1.tar.gz
tar -xzf bind-9.8.1-P1.tar.gz
cd bind-9.8.1-P1.tar.gz

./configure—prefix=/usr/local/bind-9.8.1-P1 —sysconfdir=/usr/local/bind-9.8.1-P1/etc—enable-threads —with-libtool > configure.out
less configure.out
make > make.out
less make.out
make install > make-install.out
usermod—shell /bin/false bind
cd/usr/local
chown -R root:bind bind
chmod o-rwx bind
cd bind
chmod g+r etc/rndc.key
Find thefiles where the paths need correction:
find . -type f |xargs grep "etc/bind"|awk '{print $1}'|uniq
Changethe old path /etc/bind to /usr/local/bind/etc:
find . -type f |xargs grep -l "/etc/bind"|while read file; do sed's/etc\/bind/usr\/local\/bind\/etc/g' "$file" > tmp && mvtmp "$file"; done
Changethe cache directory in named.conf.options from /var/cache/bind to/usr/local/bind/var/cache:
directory "/usr/local/bind/var/cache";
vinamed.conf
vi named.conf.local
vi named.conf.options

Comments

Popular posts from this blog

Password Expiry notification for the users in zimbra 8.x within 7 Days for the email users

This Script will run as cron tab daily basis and it will alert the users for whom password is going to expire within 7 days. It will also alert admin for the users for whom password expired. Kindly replace the domain.com with your own domain name and the  /opt/zimbra/postfix-2.10.3.2z/sbin/sendmail  path to the actual path of postfix #!/bin/bash #Script for zimbra password expiry email notification. # Meant to be performed as daily cronjob run as zimbra user.  # redirect output to a file to get a 'log file' of sorts. # Time taken of script; echo "$SECONDS Started on: $(date)" # Set variables: # First notification in days, then last warning: FIRST="7" LAST="3" # pass expiry in days, we are assuming passwd exiry is 150 Days POLICY="150" # Sent from: FROM="admin@domain.com" # Get all users - it should run once only. USERS=$(ionice -c3 /opt/zimbra/bin/zmprov -l gaa domain.com) #Todays date, in seconds: DATE...

How to Create a Delegated Admin Account in Zimbra 8.x

How to Create a Delegated Admin Account in Zimbra 8.x. Create a File as shown below with the contents .  Replace the domain.com and helpdesk Email id with your domain and helpdesk (Delegated Admin ) Name. #vi admindelegate #!/bin/bash # $1 domain.com # $2 helpdesk zmprov ma $2 zimbraIsDelegatedAdminAccount TRUE zmprov ma $2 zimbraAdminConsoleUIComponents cartBlancheUI zimbraAdminConsoleUIComponents domainListView zimbraAdminConsoleUIComponents accountListView zimbraAdminConsoleUIComponents DLListView zmprov ma $2 zimbraDomainAdminMaxMailQuota 0 zmprov grantRight domain $1 usr $2 +createAccount zmprov grantRight domain $1 usr $2 +createAlias zmprov grantRight domain $1 usr $2 +createCalendarResource zmprov grantRight domain $1 usr $2 +createDistributionList zmprov grantRight domain $1 usr $2 +deleteAlias zmprov grantRight domain $1 usr $2 +listDomain zmprov grantRight domain $1 usr $2 +domainAdminRights zmprov grantRight domain $1 usr $2 +configureQuota zmpr...

SCRIPT TO SHOW INVALID LOGIN ATTEMPTS IN RED COLOR AND VALID LOGIN IN GREEN COLOR FOR ZIMBRA 8.x

Create a File by using #vi /usr/bin/watchaudit with the following contents  tail -f /opt/zimbra/log/audit.log | awk '   /INFO/ {print "\033[32m" $0 "\033[39m"}   /WARN/ {print "\033[31m" $0 "\033[39m"} ' Close and Save the File. Run the Watchaudit File in SSH Console . #chmod +x /usr/bin/watchaudit #/usr/bin/watchaudit