Resolve Configuratin

Hello Gurus,

I am trying to understand the concept of resolve conf and hope to get some understanding.
When reviewing a sample resolv.conf @
http://www.shellhacks.com/en/Setup-D...nf-in-Examples

stumbled on a scenario.

Lets say I have the following in my resolv.conf

less /etc/resolv.conf
search uncc.org uat.uncc.org sit.uncc.org uat2.uncc.org
intranet.uncc.org
nameserver 192.168.0.100

now if I run command, Note: There is no such thing called appserver
Quote:
ping appserver
My Questions:

1 ) How many lookups are being performed. And which domains are being searched ?

2 ) Will the look up go thru all the 5 domains listed against search directive ?

3) When both directives are provided "search" and "nameserver" will the look up happen on both directives and can both directives be used together ?

Help is much appreciated.


Similar Content



Value Comparison In Bash Shell Script

I need to compare a value with different fixed value. Below is the code concept I implemented in my bash script but its giving me error.
Here "a' is the nameserver value that I extract using command line from /etc/resolv.conf. I did not put command here.

#! /bin/bash
a=1.2.3.4

if [ $a == 1.2.3.4 || 5.6.7.8 || 8.9.1.4]
then
echo " You have correct ntpserver"
else
echo"wrong ntpserver"

fi

Am I comparing the value correctly or any suggestion?

Thank you

/etc/resolv.conf Vs DNS1="x.x.x.x" In Redhat

In simple terms what is the difference between the two and what takes precedence?
In my experience the /etc/resolve.conf file will win out but I have seen when we get network issues that the network interface will use its own configuration file.

Does the interface hold this information somewhere in its cache when it starts up?

Python Script To Detect OS And Update Name Server And Options In Resolve.conf On Mult

I am trying to code a python script that does:- Using root account logs into multiple servers provided in a list. Check the OS type e.g. Linux, Solaris, HP-UX and Windows. Depending on the OS type it updates the name servers and options in /etc/resolv.conf. The update is done from a list that is also provided.

Any help is much appreciated.

BIND - What A Record I Should Add...

Hi All,

I have a website hosted at some web hosting company. Let me call it ' http://www.example.com '.

I have installed bind9 in one of the local server (private IP), called ' ns.example.com '. I have named zone as ' example.com ', same as my website.

Following is a forward zone file for ' example.com ' in box with hostname ' ns.example.com '
Code:
$ cat db.example.com 

$TTL 86400 ; (1 day)
$ORIGIN example.com.

@ IN SOA ns.example.com. admin.example.com. (
    2015042601 ; serial YYYYMMDDnn
    14400      ; refresh (4 hours)
    1800       ; retry   (30 minutes)
    1209600    ; expire  (2 weeks)
    3600 )     ; minimum (1 hour)

@  IN NS ns.example.com.
ns IN A 192.168.1.7

localhost IN A 127.0.0.1
sql       IN A 192.168.1.100
ftp       IN A 192.168.1.101

Following is a reverse zone file for ' example.com ' in box with hostname ' ns.example.com '
Code:
$ cat db.192.168.1 

$TTL 86400 ; (1 day)
$ORIGIN 1.168.192.in-addr.arpa.

@ IN SOA ns.example.com. admin.example.com. (
    2015042601 ; serial YYYYMMDDnn
    14400      ; refresh (4 hours)
    1800       ; retry   (30 minutes)
    1209600    ; expire  (2 weeks)
    3600 )     ; minimum (1 hour)

@ IN NS  ns.example.com.
7 IN PTR ns.example.com.

100 IN PTR sql.example.com.
101 IN PTR ftp.example.com.

resolve.conf
Code:
$ cat /etc/resolv.conf

search example.com
nameserver 192.168.1.7

Everything works perfectly fine. Only problem is, this bind server is unable to resolve http://www.example.com, which is my actual website.

Code:
$ nslookup linuxquestions.org
Server:		192.168.1.7
Address:	192.168.1.7#53

Non-authoritative answer:
Name:	linuxquestions.org
Address: 75.126.162.205

$ nslookup example.com
Server:		192.168.1.7
Address:	192.168.1.7#53

*** Can't find example.com: No answer

My bind server is recursive, and I dont want to use other public dns servers. Also my root hints are latest.

How do I resolve my website IP address?

Thanks

NOTE: my actual website name is different. I have used example.com just for illustration only. My bind server will resolve real www.example.com.
Code:
$ nslookup example.com
Server:		192.168.1.7
Address:	192.168.1.7#53

Non-authoritative answer:
Name:	example.com
Address: 93.184.216.34

How To Search What Is Returned By Grep For Multiple Patterns?

Hi, I am new to Linux and the full capabilities of grep, so I'm having some difficulty figuring out how to obtain the information I want. I'm using grep to search if specific servers are listed in my local nameserver like this:

chknsv NSV | egrep 'box1|box2|box3'

Where chknsv is a function to list all items in the nameserver that include substring NSV in the line.

Ideally, what is returned from egrep is a list like this:
$NSV - box1 - 40000 - tcp
$NSV - box2 - 40000 - tcp
$NSV - box3 - 40000 - tcp

(The first column represents Service name, the second Host name, the third Port, and the fourth Protocol)

What I am wondering is how to check what is returned from egrep to make sure that all of the server names I searched for are included? The exit status of the egrep command returns 0 when anything is returned regardless of how many server names I was searching for. So, it would return 0 even if only one or two of the three servers I'm searching for are listed. This kind of scenario is what I'm trying to detect to verify whether or not all of the server names I searched for are active in the nameserver.

I know it can be done with multiple calls to egrep, but that seems really clunky to me - I'm hoping there's a more elegant solution that I'm just unaware of.

Any advice/suggestions would be greatly appreciated! Thanks!

"vconsole.conf" Show Unicode

Hi!

Here is mine configuration and I want make it show unicode(russian) in console, it works perfect in X11 but not when I logging into tty.

vconsole.conf
Code:
LOCALE="en_US.UTF-8"
KEYMAP="sv-latin1"
FONT_UNIMAP="lat1"
FONT_MAP="ISO8859-1"
CONSOLEFONT="ruscii_8x8"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Stockholm"
USECOLOR="yes"

Apache Virtual Host

Hello geeks,
I am newbie in Linux and practicing configuring Apache httpd.conf file. I am looking to configure virtualhost but, I can not find directives for virtual hosting. any step by step regarding NameVirtualhost directive would be helpful. I am not sure if I need to install additional modules to get it done.
thanks for your help in advance.

-Hassan

Please Help Me To Start My DNS Server Logging.

I am facing problem in enabling the DNS Log making in named.conf file.
My /etc/named.conf file structure is as follows:
-------------------------------------------------------------
//
// 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.
//

options {
listen-on port 53 { 127.0.0.1; 10.40.124.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; 10.40.124.2; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "/var/log/named.run";
severity dynamic;
print-time yes;
};

channel queries_channel {
file "/var/log/queries.log";
severity dynamic;
print-time yes;
print-severity yes;
};
channel security_channel {
file "/var/log/security.log" versions 3 size 5m;
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};

channel update_security_channel {
file "/var/log/updates.log" versions 3 size 5m;
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};

channel dnssec_channel {
file "/var/log/dnssec.log" versions 3 size 5m;
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};

channel xfers_channel {
file "/var/log/zone_transfers.log" versions 3 size 5m;
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};

category queries { queries_channel; };
category security { security_channel; };
category update-security { update_security_channel; };
category dnssec { dnssec_channel; };
category xfer-out { xfers_channel; };
};
zone "." IN {
type hint;
file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
----------------------------------------------------------------
My DNS Server works fine. Only it cannot make the log.
when I will run this command:
#dig -x 10.40.124.2
the result comes fine but the log is not make in /var/log/queries.log file.
The named is running without chroot enviroment.
Please help me in solving this.

Setting Up Apache2 Virtual Host - Getting URL Not Found Error

Trying to set up Virtual Host on Ubuntu 14.04.

Any help to solve this is greatly appreciated!!!

Here is info:

Directory: /var/www/mydb.com/public_html (owner set to $USER:$USER)

Permissions: sudo chmod -R 755 /var/www/

Sample Page: /var/www/mydb.com/public_html/index.html (Shows Message)

Virtual Host Files:

Sites Available: mydb.com.conf
set ServerAdmin => admin@mydb.com
set ServerName => mydb.com
set ServerAlias => www.mydb.com
set DocumentRoot => /var/www/mydb.com/public_html

Sites Enabled: mydb.com.conf
ServerName mydb.com
ServerAlias www.mydb.com
ServerAdmin admin@mydb.com
DocumentRoot /var/www/mydb.com/public_html


I: disabled 000-default.conf w/a2dissite
enabled mydb.com.conf w/a2ensite

HOSTS File /etc/hosts:

127.0.1.1 localhost mydb.com
127.0.0.1 localhost
127.0.1.1 rick-Latitude-E6510

Result of localhost/mydb.com Same with www.mydb.com.

404 Not Found.
The requested URL /mydb.com was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80

This from /var/log/apache2/access.log

127.0.0.1 - - [03/Apr/2015:13:19:08 -0700] "GET /mydb.com HTTP/1.1" 404 496 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"

Check Empty Variable Without Comments

Hello,

They gave me this:
Code:
#!/bin/bash

# Write error message on stderr and die
function die() {
  echo "$@" >&2
  exit 1
}

# Load var from properties files
function load() {
  for propertie in "$@" ; do
    [[ -f "${propertie}" ]] || die "load() : \"${propertie}\" don't exist !"
    while read ; do
echo "${REPLY%=*}"
echo "${REPLY#*=}"
      [[ -n "${REPLY%%=*}" && -z "${REPLY#*=}" ]] || die "load() : Variable \"${REPLY%%=*}\" is empty!"
      eval "${REPLY%%=*}"=\'"${REPLY#*=}"\'
    done < "${propertie}"
  done
}

load "manage_srcds.conf"
echo "SRCDS_TICKRATE=$SRCDS_TICKRATE"
echo "SRCDS_SCREEN=$SRCDS_SCREEN"
echo "SRCDS_SRCDS_GAME_NAME=$SRCDS_GAME_NAME"
echo "SRCDS_MAXPLAYERS=$SRCDS_MAXPLAYERS"

but, return:
Quote:
###################################################
###################################################
load() : Variable "###################################################" is empty!

cat manage_srcds.conf

I just wish that there was no empty variable excluding those who do not have integer.

Best regards,