/etc/resolv.conf problems

In my conky script, the gmail portion stopped working so I just tried to do a normal wget https://mail.google.com in the terminal. The output was
--11:41:41-- https://mail.google.com/
=> `index.html'
Resolving mail.google.com... 1.0.0.0
Connecting to mail.google.com|1.0.0.0|:443...
which obviously isn't right. What could have changed? I use WICD to connect to my network.
rc.conf
# /etc/rc.conf - Main Configuration for Arch Linux
# LOCALIZATION
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="Canada/Pacific"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
# HARDWARE
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()
# Modules to load at boot-up (in this order)
# - prefix a module with a ! to blacklist it
MODULES=(sky2 iwl4965 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore acpi-cpufreq cpufreq_conservative)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# NETWORKING
HOSTNAME="reasons"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available
# interfaces.
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
lo="lo 127.0.0.1"
eth0="dhcp"
wlan0="dhcp"
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0 wlan0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
# Network profiles are found in /etc/network-profiles
#NET_PROFILES=(main)
# DAEMONS
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
DAEMONS=(syslog-ng crond dbus netfs !network !dhcdbd wicd @cups @alsa @acpid @hal @fam @mpd @acpid @cpufreq gdm)
# End of file
/etc/hosts
# /etc/hosts: static lookup table for host names
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost reasons
# End of file
Last edited by Reasons (2008-01-11 01:28:45)

nawcom wrote:
i was wandering around forums and i noticed the wicd issue with archlinux, since it still focuses on dhcpcd, not dhclient - so resolv.conf doesnt upload.
http://bbs.archlinux.org/viewtopic.php? … 34#p332334
let me know if it solves the issue.
That fixed it, thanks. Let's hope it stays this time.
Cerebral wrote:
Reasons wrote:
I tried that all to no avail. The problem actually went away for a while but now it is back. I've disabled ipv6 which is what solved it but now that isn't working. Also,
[shawn] /etc/rc.d/dhcpd start
:: Starting DHCP Server                                                  [FAIL]
Is there a reason you're starting the dhcp Server, and not client?  Do you want dhcpcd?
That was my mistake.

Similar Messages

  • [SOLVED] How Can I Stop DHCPCD from Overwriting my /etc/resolv.conf...

    Hey guys,
    For some unknown reason /etc/dhcpcd.conf continually overwrites my /etc/resolv.conf file, eventhough I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
    This is screwing up my DNS and intermittently creating connection problems. Any of you guys know why the hook is not taking effect or how I can stop dhcpcd from overwritting this file?
    Thanks
    Last edited by w201 (2013-03-18 19:05:15)

    drcouzelis wrote:
    w201 wrote:I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
    kaszak696 wrote:
    dhcpcd's configuration file may be edited to prevent the dhcpcd daemon from overwriting /etc/resolv.conf. To do this, add the following to the last section of /etc/dhcpcd.conf:
    nohook resolv.conf
    I don't think that information will help w201...
    I changed my DNS to the Google one (8.8.8.8 or something). That's in "resolv.conf", isn't it? I remember editing some OTHER configuration file, which is then read to create the "resolve.conf" file. There it is, in that link to the wiki, under "Use resolv.conf.head". Does that help you do what you want to do?
    There's three techniques at the wiki link, the nohook one, the resolv.conf.head one and the write-protection attribute. 

  • Who writes /etc/resolv.conf?

    Someone is writing the "domain" configuration directive to /etc/resolv.conf on boot. I suspected DHCP, so cleared the domain field at the DHCP server that serves the Solaris 10 computer in question, but /etc/resolv.conf is still picking up the domain name from somewhere. Who does this and where does the information come from?
    Alan Feldstein
    Cosmic Horizon
    http://www.alanfeldstein.com/

    Observed that ".alanfeldstein.com" was being appended to each inquiry (as suggested by result) of the following form:
    getent hosts yahoo.comThis is incorrect. alanfeldstein.com is hosted by a service provider, not here. That is, it's not on the path from here to DNS. If a domain must be appended to a name lookup handled by DNS, that of my ISP (earthlink.net), or none at all, would be more appropriate. So I removed
    domain alanfeldstein.comfrom /etc/resolv.conf. However, it reappeared after reboot. I theorized that /etc/resolv.conf was written with data from my DHCP server, so I emptied the domain field there.
    Still, /etc/resolv.conf was being automatically written with the same date at boot time. This question can remain open (with reduced Dukes) because I'm still curious about where that data was coming from after being cleared from the DCHP server's domain field.
    I did find that specifying earthlink.net at the DHCP server caused
    domain earthlink.netto appear in /etc/resolv.conf of my NIS server, which forwards non-local names to DNS on behalf of my NIS clients. And that fixes the problem I was having (i.e. inability to lookup non-local names from NIS clients).
    Alan Feldstein

  • Dhcpcd and /etc/resolv.conf

    How can one prevent dhcpcd from modifying /etc/resolve.conf?
    Or can one prepend static options before it's own ones?
    (I'de like to have my own search and nameserver entry.)

    Yes. Add it to /etc/conf.d/dhcpcd in DHCPCD_ARGS.

  • /etc/resolv.conf between netctl profile switches

    Hi, all.
    I use same laptop at home and in my office. Network is managed by netct. At home I connect using a profile generated by wifi-menu, in the office — plain ethernet-dhcp profile form examples folder.
    With both connections nameservers are obtained via dhcp.
    The issue is that after switching from office ethernet-dhcp to my home wi-fi netctl profile, /etc/resolve.conf retains nameserver and domain entries from the office connection. My home's nameserver entry gets appended to the end of the resolv.conf file. This, of course, causes unacceptable delays when resolving domain names, so I have to edit /etc/resolve.conf manually every time I've been using that office's connection.
    I'm wondering whether there is something wrong with my setup.
    Profiles are nothing special, as I said:
    Description='Automatically generated profile by wifi-menu'
    Interface=wlp3s0
    Connection=wireless
    Security=wpa
    ESSID=my_ssid
    IP=dhcp
    Key=my_passwd
    Description='A dhcp ethernet connection'
    Interface=enp0s25
    Connection=ethernet
    IP=dhcp
    DHCPClient='dhcpcd'
    Please, help me to resolve that issue. Feel free to ask for more details if needed.
    Thanks in advance for help.
    Last edited by eDio (2014-04-12 19:30:51)

    2branch,
    I switch them with netctl switch-to command, which is incorrect, as I understand now.
    Important notice is that I unplug ethernet cord first, and then I perform a switch.
    Also I tried disabling ethernet-dhcp explicitly after switching to wlp3s0 — not helped.
    I checked /run/resolvconf/interfaces, and found that enp0s25 is missing. Instead, I have tun0, which contains problematic entries.
    dhcpcd --dumplease enp0s25
    broadcast_address=10.1.20.255
    dhcp_lease_time=604800
    dhcp_message_type=5
    dhcp_rebinding_time=529200
    dhcp_renewal_time=302400
    dhcp_server_identifier=10.1.10.2
    domain_name=my.company.domain.name
    domain_name_servers='10.1.10.2 10.1.1.6'
    ip_address=10.1.20.30
    network_number=10.1.20.0
    ntp_servers=10.1.10.2
    routers=10.1.20.1
    subnet_cidr=24
    subnet_mask=255.255.255.0

  • Dhcpcd overriding /etc/resolv.conf, 'nohook resolv.conf' [solved]

    hello.
    I set dhcpcd not to override the /etc/resolv.conf file:
    [root@ jenia]# cat /etc/dhcpcd.conf
    # A hook script is provided to lookup the hostname if not set by the DHCP
    # server, but it should not be run by default.
    nohook lookup-hostname
    noipv4ll
    nohook resolv.conf <----------------------------------------------------------------------------
    However, this has no effect:
    [root@ jenia]# cat /etc/resolv.conf
    domain members.linode.com
    nameserver 72.14.179.5
    nameserver 72.14.188.5
    nameserver 2600:3c00::2
    nameserver 2600:3c00::3
    options rotate
    [root@ jenia]# systemctl start [email protected]
    [root@ jenia]# cat /etc/resolv.conf
    # This file is managed by systemd-resolved(8). Do not edit.
    # Third party programs must not access this file directly, but
    # only through the symlink at /etc/resolv.conf. To manage
    # resolv.conf(5) in a different way, replace the symlink by a
    # static file or a different symlink.
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    nameserver 2001:4860:4860::8888
    # Too many DNS servers configured, the following entries may be ignored
    nameserver 2001:4860:4860::8844
    As you can see dhcpcd ovveride the /etc/resolv.conf file.
    How can I avoid this? How can I change the file and make the changes permanent.
    Thanks in advance.
    Last edited by jenia (2014-07-16 17:20:02)

    yes. exactly. i removed and used a text editor to make the necessary changes to a file of the same name (/etc/resolv.conf).
    now the changes remained.
    thanks.

  • [solved]how to stop /etc/resolv.conf keeps being overwritten ???

    no matter how many times to change the content, it keeps like that:
    # Generated by dhcpcd from eth0
    # /etc/resolv.conf.head can replace this line
    nameserver 192.168.8.1
    # /etc/resolv.conf.tail can replace this line
    so i can't add nameserver in it
    Last edited by tempo (2010-01-14 15:01:35)

    The clue is in the message, use a file called resolv.conf.head to add a nameserver to the top and resolv.conf.tail to add it to the bottom.
    It's being overwritten because you are using dhcpcd to auto configure your network settings.
    Last edited by Meyithi (2010-01-14 13:03:43)

  • How to regenerate /private/etc/resolv.conf

    Folks,
    I use my Snow Leopard macbook pro on multiple networks and recently made the mistake of editing the /private/etc/resolv.conf to add a search path. So now the file looks like so:
    # Mac OS X Notice
    # This file is not used by the host name and address resolution
    # or the DNS query routing mechanisms used by most processes on
    # this Mac OS X system.
    # This file is automatically generated.
    search mydomain.com
    nameserver 192.168.2.2
    Edit: The file doesn't appear properly but the first few lines are all commented out using #.
    I hadn't paid much attention to this file before now so I'm not sure whether this file keeps getting re-generated for every network (e.g. by dhcpd) but it's certainly not being re-generated any more.
    I heavily use the "host" command to lookup hostnames which is one of the few commands that uses the /private/etc/resolv.conf file instead of SL's own DNS. I'm definitely feeling pain at this time. Any ideas on how I can get this file to be re-generated again?
    FWIW, I repaired permissions on the disk using "Disk Utility" and the permissions look like:
    lrwxr-xr-x@ 1 root wheel 11 Dec 1 22:46 /etc -> private/etc
    -rwxr-xr-x 1 root wheel 261 Dec 14 21:26 /etc/resolv.conf
    -rwxr-xr-x 1 root wheel 261 Dec 14 21:26 /private/etc/resolv.conf
    Thoughts?
    Message was edited by: Shahbaz Javeed

    Depending on your editor, it is possible that the editor created a new file uniquely named file, then renamed the uniquely named file to the original name, causing the file system to delete the current directory entry (the symlink). This would have the effect of deleting the symlink and replacing it with a real file.
    Another possibility is that the orignal symlink was changed to resolv.bak (or similar name). if you edited multiple times with an editor that does this, the 2nd editing session would have removed the symlink from the system, and left only regular files.

  • [SOLVED] /etc/resolv.conf vs. the DNS field in netctl profiles

    I'm a bit confused about the current role of /etc/resolv.conf.  The Netctl profile documentation has a DNS field, so has /etc/resolv.conf become functionally obsolete when using netctl?  Or is /etc/resolv.conf still useful when you have multiple interfaces, as it specifies DNS servers for all interfaces?
    Last edited by pgoetz (2014-08-30 11:51:50)

    From https://wiki.archlinux.org/index.php/resolv.conf:
    dhcpcd, netctl, NetworkManager, and various other processes can overwrite /etc/resolv.conf.

  • Resolv.conf problems [SOLVED]

    hey all,
    i was playing around with  https://wiki.archlinux.org/index.php/Pdnsd  ,followed step by step the tutorial.
    the tutorial states;
    System setup
    Now it is time to point your system toward your brand-new DNS server.
    If you use DHCP to configure your network settings, you need to edit /etc/resolv.conf.head (otherwise, you should modify /etc/resolv.conf); add pdnsd before all of the other nameservers:
    # pdnsd cache @ localhost
    nameserver 127.0.0.1
    my resolv.conf
    # Generated by dhcpcd from eth0
    # /etc/resolv.conf.head can replace this line
    domain telenet.be
    nameserver 195.130.130.5
    nameserver 195.130.131.5
    # /etc/resolv.conf.tail can replace this line
    becomes
    # Generated by dhcpcd from eth0
    # /etc/resolv.conf.head can replace this line
    # pdnsd cache @ localhost
    nameserver 127.0.0.1
    domain telenet.be
    nameserver 195.130.130.5
    nameserver 195.130.131.5
    # /etc/resolv.conf.tail can replace this line
    am i right so far /? ,well when i do '/etc/rc.d/network restart'  my resolv.conf gets reset-ed to default....what am i doing wrong.
    Last edited by gregor (2012-01-30 19:03:53)

    yup so i did ,made a file  '/etc/resolv.conf.head' with
    # pdnsd cache @ localhost
    nameserver 127.0.0.1
    restarted my network '/etc/rc.d/network restart' and my resolv.conf got adjusted the right way
    # Generated by dhcpcd from eth0
    # pdnsd cache @ localhost
    nameserver 127.0.0.1
    domain telenet.be
    nameserver 195.130.131.133
    nameserver 195.130.130.5
    # /etc/resolv.conf.tail can replace this line
    the con-tense of the file  '/etc/resolv.conf.head' replaces literary !!!!!
    # /etc/resolv.conf.head can replace this line
    Last edited by gregor (2012-01-30 19:08:09)

  • Which configuration file modified the /etc/resolv.conf ?

    Hello Everyone,
    I have 2 linux VM in my laptop that has been setup in similar way but one of them behaves differently every time it gets rebooted.
    This is OEL6 update 5
    I configured 4 interfaces:
    eth0 - eth3 is setup with NAT-Network to be able to communicate with other VMs only.
    eth4 is setup with bridged network.
    I've configured the ifcfg-eth# scripts as follows:
    Interface
    server 1
    server 2
    eth0
    DEVICE=eth0
    TYPE=Ethernet
    UUID=8cb50704-029f-469a-b031-da44b4a49b74
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=10.1.2.71
    PREFIX=24
    GATEWAY=10.1.2.1
    DNS1=10.1.2.90
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth0"
    HWADDR=08:00:27:12:F8:42
    LAST_CONNECT=1389967507
    DEVICE=eth0
    TYPE=Ethernet
    UUID=f10e7ab5-7b7e-4bcf-9ddb-a2ab439a776a
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=10.1.2.72
    PREFIX=24
    GATEWAY=10.1.2.1
    DNS1=10.1.2.90
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth0"
    HWADDR=08:00:27:45:56:13
    LAST_CONNECT=1389968121
    eth1
    DEVICE=eth1
    TYPE=Ethernet
    UUID=568d8c14-d28e-48f7-82e5-dd7764968648
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=192.168.5.81
    PREFIX=24
    GATEWAY=192.168.5.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth1"
    HWADDR=08:00:27:B1:D9:D6
    DEVICE=eth1
    TYPE=Ethernet
    UUID=dc09606a-5126-4d2c-a0bc-ea11ce0dc80f
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=192.168.5.82
    PREFIX=24
    GATEWAY=192.168.5.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth1"
    HWADDR=08:00:27:15:7B:39
    LAST_CONNECT=1389968121
    eth2
    DEVICE=eth2
    TYPE=Ethernet
    UUID=6e6858b9-9709-4334-9b58-bb6f02a30e94
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    HWADDR=08:00:27:9C:16:71
    IPADDR=192.168.7.51
    PREFIX=24
    GATEWAY=192.168.7.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth2"
    DEVICE=eth2
    TYPE=Ethernet
    UUID=283b2c5c-04e1-47ca-8375-6c52d333099f
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=192.168.7.52
    PREFIX=24
    GATEWAY=192.168.7.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth2"
    HWADDR=08:00:27:A8:44:45
    LAST_CONNECT=1389968121
    eth3
    DEVICE=eth3
    TYPE=Ethernet
    UUID=ecca01b5-e18f-4f7f-b617-0cfe50e17638
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    HWADDR=08:00:27:5C:F8:96
    IPADDR=192.168.9.51
    PREFIX=24
    GATEWAY=192.168.9.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth3"
    DEVICE=eth3
    TYPE=Ethernet
    UUID=9f2f8b5a-2650-412b-9d12-49de5484a877
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    IPADDR=192.168.9.52
    PREFIX=24
    GATEWAY=192.168.9.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth3"
    HWADDR=08:00:27:27:0F:F0
    LAST_CONNECT=1389968136
    eth4
    HWADDR=08:00:27:EC:60:F2
    TYPE=Ethernet
    BOOTPROTO=none
    NM_CONTROLLED=no
    DEFROUTE=no
    PEERDNS=no
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    IPADDR=192.168.1.30
    DNS1=192.168.1.90
    NAME=eth4
    UUID=6c6afa4f-48ce-47c7-9968-3419b4e5f8ea
    ONBOOT=yes
    LAST_CONNECT=1393844453
    HWADDR=08:00:27:FD:E7:7E
    TYPE=Ethernet
    BOOTPROTO=none
    NM_CONTROLLED=no
    DEFROUTE=no
    PEERDNS=no
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    IPADDR=192.168.1.31
    DNS1=192.168.1.90
    NAME=eth4
    UUID=0ca62e7e-6770-45aa-a7a2-bca42cf3ed9c
    ONBOOT=yes
    LAST_CONNECT=1393849919
    however, each time I rebooted, these are the difference on the /etc/resolv.conf and the other configuration
    Config
    Server 1
    Server 2
    /etc/resolv.conf
    ; generated by /sbin/dhclient-script
    search wrx4.vm
    nameserver 10.1.2.90
    nameserver 103.11.48.126
    # Generated by NetworkManager
    search wrx4.vm
    # No nameservers found; try putting DNS servers into your
    # ifcfg files in /etc/sysconfig/network-scripts like so:
    # DNS1=xxx.xxx.xxx.xxx
    # DNS2=xxx.xxx.xxx.xxx
    # DOMAIN=lab.foo.com bar.foo.com
    nameserver 10.1.2.90
    chkconfig --list NetworkManager
    NetworkManager  0:off   1:off   2:off   3:off   4:off   5:off   6:off
    NetworkManager  0:off   1:off   2:off   3:off   4:off   5:off   6:off
    service NetworkManager status
    NetworkManager is stopped
    NetworkManager is stopped
    I never setup any dhcp client configuration before, but each time the VM is rebooted or started it seems that the /etc/resolv.conf always gets overwritten again.
    However, in Server 1, somehow the dhcp client is working and getting the right DNS server IP address.
    What I want to achieve for the Server 2 is like the one in the Server 1 where the nameserver I got from the ISP is also configured there.
    That will made it easier if I need to download just a small file from the internet.
    Other than that, I also wanted to understand what other configuration that could affect this /etc/resolve.conf file gets overwritten, which configuration and how to configure it.
    Thanks in advance for your help in advance.
    Adhika
    Message was edited by: Adhika W

    Hi Dude!,
    To make it simpler, I can simply delete those interfaces (eth0, eth1, eth2, & eth3) right now and left with eth4 which I think can be directed to the actual question I was asking.
    So here's the result of ipconfig on my host:
    Ethernet adapter Local Area Connection:
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
       Physical Address. . . . . . . . . : 00-90-F5-CC-F9-DB
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
       IPv4 Address. . . . . . . . . . . : 192.168.1.5(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . : 192.168.1.1
       DNS Servers . . . . . . . . . . . : 192.168.1.1
                                           103.11.48.126
       NetBIOS over Tcpip. . . . . . . . : Enabled
    As you can see from that result, if you compare the Server 1 and Server 2, the /etc/resolv.conf from Server 1 managed to get that 103.11.48.126, whereas the one in the Server 2 couldn't.
    This is exactly what I'm trying to resolve.
    Does this make any sense to you?
    Just forget about the other interfaces.
    Thank you,
    Adhika

  • /etc/resolv.conf Configuration

    I have the following in all my servers resolv.conf file and I was wondering if having the "domain" line and the "search" line in there is the right thing to do. It has been suggested to remove the "domain" line.
    domain mybiz.com
    nameserver 10.5.24.70
    nameserver 10.7.24.70
    search mybiz.com myoldbiz.com
    Thanks.
    Brian

    Good suggestion. I did read the man pages and it did not lead me to believe that having both lines in the resolv.conf file mattered. One thing that I did notice was that if my hostsname does not include the domain name, then it will use the root doamin. I'm not following that.
    root / ] # hostname
    rchdxz41
    root / ] # domainname
    The last command "domainname" returns no value. I remember in older Solaris version that I set a /etc/defaultdoain. I'm not sure it that's still used.
    Brian

  • Configure resolv.conf nsswitch.conf etc to search .local

    After installing a new router I find I cannot ping hosts on my local network using just the simple hostname.
    I used to be able to ping myhost, but now I find I need to ping myhost.local.
    My nsswitch.conf hosts line looks like
    hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname wins
    I tried adding various search values to  /etc/resolv.conf, but couldn't find one that worked.
    Is there a way to get the .local domain searched, my router (although expensive) doesn't seem to facilitate this?

    After some digging in the nss-mdns package source I find that the option to respect resolv.conf search domains is turned off in the Arch build. However, a simple patch to nss.c seems to fix things up fairly easily. A more complex one would be required to respect the /etc/mdns.allowed file domains. It seems like such an obvious thing to do for domainless searches that I wonder why this wasn't done by the original author.
    $ diff nss.c.orig nss.c
    380a381,407
    > if (u.count == 0 && avahi_works && !strstr(name, ".")) {
    > const char *p="local";
    > int fullnamesize;
    > char *fullname;
    > fullnamesize = strlen(name) + strlen(p) + 2;
    > if ((fullname = malloc(fullnamesize))){
    > snprintf(fullname, fullnamesize, "%s.%s", name, p);
    > if (verify_name_allowed(fullname)) {
    > int r;
    > if ((r = avahi_resolve_name(af, fullname, data)) < 0) {
    > /* Lookup failed */
    > avahi_works = 0;
    > }
    > else if (r == 0) {
    > /* Lookup succeeded */
    > if (af == AF_INET && ipv4_func)
    > ipv4_func((ipv4_address_t*) data, &u);
    > if (af == AF_INET6 && ipv6_func)
    > ipv6_func((ipv6_address_t*)data, &u);
    > }
    > else
    > /* Lookup suceeded, but nothing found */
    > status = NSS_STATUS_NOTFOUND;
    > }
    > free(fullname);
    > }
    > }

  • [SOLVED] Question about resolv.conf

    I successfully configured my Arch box with a static IP by following the instructions on the Arch wiki page here but had a couple of questions about configuring /etc/resolv.conf:
    1) What is the proper way to obtain the domain name that should be inserted into resolv.conf?
    2) What exactly is this domain name used for?  I read the man page but still don't really understand it.  Why do I need a domain name if I already have a working set of nameservers to resolve IP addresses?
    EDIT: @ewaller Yes I edited the OP because I realized that my original problem was that I just hadn't added a domain name in my resolv.conf file.  I edited my original post because 1) the instructions are already posted clearly on Arch Wiki so my post really wouldn't be beneficial and 2) so I could ask my real question without making other people waste their time reading through my other nonsense
    Last edited by choogi (2010-09-09 04:06:45)

    yejun wrote:You can just use public dns like 8.8.8.8 or 4.2.2.1. There's no other way to get dnsserver besides dhcp.
    Yes, I know how to get a nameserver, but I'm asking about the domain name that goes in resolv.conf.  The Arch wiki tutorial for setting up static IP uses the following resolv.conf as an example:
    nameserver 61.23.173.5
    nameserver 61.95.849.8
    search example.com
    My question has to do with what the "search example.com" does.  I don't have a domain name associated with my machine, but if I remove that line, then I get "web page unavailable" when I try to load any web site, which suggests that I'm not connecting to any nameservers right?

  • Resolve.conf, dnsmasq and external DNS servers

    I am using dnsmasq to filter out ad urls, so my  /etc/resolv.conf looks like that:
    # Generated by dhcpcd from wlan0
    nameserver 127.0.0.1
    domain home
    nameserver 192.168.1.254
    # /etc/resolv.conf.tail can replace this line
    However, it looks like after getting through the url filtration layer of dnsmasq, the URLs are being resolved by a DNS sever of whatever Access Point I am connected to. This create problems, because they often render me unable to connect to services like sourceforge.net, etc.
    So, instead of that, I would like my system to fall back to Google and OpenDNS after filtering urls through dnsmasq.
    But how can I do that? This is a specific case and wiki does not cover it.
    Last edited by Lockheed (2013-05-19 16:50:43)

    $ cat /etc/resolv.conf
    # Generated by dhcpcd from wlan0
    nameserver 127.0.0.1
    nameserver 8.8.8.8
    domain home
    # /etc/resolv.conf.tail can replace this line
    The google DNS is what I put in there earlier to be able to use internet after dnsmasq stopped starting.
    $ cat /etc/resolvconf.conf
    # Configuration for resolvconf(8)
    # See resolvconf.conf(5) for details
    resolv_conf=/etc/resolv.conf
    # If you run a local name server, you should uncomment the below line and
    # configure your subscribers configuration files below.
    name_servers=127.0.0.1
    # Write out dnsmasq extended configuration and resolv files
    dnsmasq_conf=/etc/dnsmasq-conf.conf
    dnsmasq_resolv=/etc/dnsmasq-resolv.conf
    $ cat /etc/dnsmasq.conf
    # Configuration file for dnsmasq.
    # Format is one option per line, legal options are the same
    # as the long options legal on the command line. See
    # "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
    # Listen on this specific port instead of the standard DNS port
    # (53). Setting this to zero completely disables DNS function,
    # leaving only DHCP and/or TFTP.
    #port=5353
    # The following two options make you a better netizen, since they
    # tell dnsmasq to filter out queries which the public DNS cannot
    # answer, and which load the servers (especially the root servers)
    # unnecessarily. If you have a dial-on-demand link they also stop
    # these requests from bringing up the link unnecessarily.
    # Never forward plain names (without a dot or domain part)
    #domain-needed
    # Never forward addresses in the non-routed address spaces.
    #bogus-priv
    # Uncomment this to filter useless windows-originated DNS requests
    # which can trigger dial-on-demand links needlessly.
    # Note that (amongst other things) this blocks all SRV requests,
    # so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk.
    # This option only affects forwarding, SRV records originating for
    # dnsmasq (via srv-host= lines) are not suppressed by it.
    #filterwin2k
    # Change this line if you want dns to get its upstream servers from
    # somewhere other that /etc/resolv.conf
    #resolv-file=/etc/resolv-dnsmasq.conf
    # By default, dnsmasq will send queries to any of the upstream
    # servers it knows about and tries to favour servers to 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
    # If you don't want dnsmasq to read /etc/resolv.conf or any other
    # file, getting its servers from this file instead (see below), then
    # uncomment this.
    #no-resolv
    # If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
    # files for changes and re-read them then uncomment this.
    #no-poll
    # Add other name servers here, with domain specs if they are for
    # non-public domains.
    #server=/localnet/192.168.0.1
    server=208.67.222.222
    server=208.67.220.220
    # Example of routing PTR queries to nameservers: this will send all
    # address->name queries for 192.168.3/24 to nameserver 10.1.2.3
    #server=/3.168.192.in-addr.arpa/10.1.2.3
    # Add local-only domains here, queries in these domains are answered
    # from /etc/hosts or DHCP only.
    #local=/localnet/
    # Add domains which you want to force to an IP address here.
    # The example below send any host in double-click.net to a local
    # web-server.
    #address=/double-click.net/127.0.0.1
    # --address (and --server) work with IPv6 addresses too.
    #address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83
    # You can control how dnsmasq talks to a server: this forces
    # queries to 10.1.2.3 to be routed via eth1
    # server=10.1.2.3@eth1
    # and this sets the source (ie local) address used to talk to
    # 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that
    # IP on the machine, obviously).
    # [email protected]#55
    # If you want dnsmasq to change uid and gid to something other
    # than the default, edit the following lines.
    #user=
    #group=
    # If you want dnsmasq to listen for DHCP and DNS requests only on
    # specified interfaces (and the loopback) give the name of the
    # interface (eg eth0) here.
    # Repeat the line for more than one interface.
    #interface=lo
    # Or you can specify which interface _not_ to listen on
    #except-interface=
    # Or which to listen on by address (remember to include 127.0.0.1 if
    # you use this.)
    #listen-address=127.0.0.1
    # If you want dnsmasq to provide only DNS service on an interface,
    # configure it as shown above, and then use the following line to
    # disable DHCP and TFTP on it.
    #no-dhcp-interface=
    # On systems which support it, dnsmasq binds the wildcard address,
    # even when it is listening on only some interfaces. It then discards
    # requests that it shouldn't reply to. This has the advantage of
    # working even when interfaces come and go and change address. If you
    # want dnsmasq to really bind only the interfaces it is listening on,
    # uncomment this option. About the only time you may need this is when
    # running another nameserver on the same machine.
    #bind-interfaces
    # If you don't want dnsmasq to read /etc/hosts, uncomment the
    # following line.
    #no-hosts
    # or if you want it to read another file, as well as /etc/hosts, use
    # this.
    addn-hosts=/etc/hosts.block
    #hostsfile=/etc/hosts.block
    # Set this (and domain: see below) if you want to have a domain
    # automatically added to simple names in a hosts-file.
    #expand-hosts
    # 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=thekelleys.org.uk
    # Set a different domain for a particular subnet
    #domain=wireless.thekelleys.org.uk,192.168.2.0/24
    # Same idea, but range rather then subnet
    #domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200
    # Uncomment this to enable the integrated DHCP server, you need
    # to supply the range of addresses available for lease and optionally
    # a lease time. If you have more than one network, you will need to
    # repeat this for each network on which you want to supply DHCP
    # service.
    #dhcp-range=192.168.0.50,192.168.0.150,12h
    # This is an example of a DHCP range where the netmask is given. This
    # is needed for networks we reach the dnsmasq DHCP server via a relay
    # agent. If you don't know what a DHCP relay agent is, you probably
    # don't need to worry about this.
    #dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
    # This is an example of a DHCP range which sets a tag, so that
    # some DHCP options may be set only for this network.
    #dhcp-range=set:red,192.168.0.50,192.168.0.150
    # Use this DHCP range only when the tag "green" is set.
    #dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h
    # Specify a subnet which can't be used for dynamic address allocation,
    # is available for hosts with matching --dhcp-host lines. Note that
    # dhcp-host declarations will be ignored unless there is a dhcp-range
    # of some type for the subnet in question.
    # In this case the netmask is implied (it comes from the network
    # configuration on the machine running dnsmasq) it is possible to give
    # an explicit netmask instead.
    #dhcp-range=192.168.0.0,static
    # Enable DHCPv6. Note that the prefix-length does not need to be specified
    # and defaults to 64 if missing/
    #dhcp-range=1234::2, 1234::500, 64, 12h
    # Do Router Advertisements, BUT NOT DHCP for this subnet.
    #dhcp-range=1234::, ra-only
    # Do Router Advertisements, BUT NOT DHCP for this subnet, also try and
    # add names to the DNS for the IPv6 address of SLAAC-configured dual-stack
    # hosts. Use the DHCPv4 lease to derive the name, network segment and
    # MAC address and assume that the host will also have an
    # IPv6 address calculated using the SLAAC alogrithm.
    #dhcp-range=1234::, ra-names
    # Do Router Advertisements, BUT NOT DHCP for this subnet.
    # Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.)
    #dhcp-range=1234::, ra-only, 48h
    # Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA
    # so that clients can use SLAAC addresses as well as DHCP ones.
    #dhcp-range=1234::2, 1234::500, slaac
    # Do Router Advertisements and stateless DHCP for this subnet. Clients will
    # not get addresses from DHCP, but they will get other configuration information.
    # They will use SLAAC for addresses.
    #dhcp-range=1234::, ra-stateless
    # Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses
    # from DHCPv4 leases.
    #dhcp-range=1234::, ra-stateless, ra-names
    # Do router advertisements for all subnets where we're doing DHCPv6
    # Unless overriden by ra-stateless, ra-names, et al, the router
    # advertisements will have the M and O bits set, so that the clients
    # get addresses and configuration from DHCPv6, and the A bit reset, so the
    # clients don't use SLAAC addresses.
    #enable-ra
    # Supply parameters for specified hosts using DHCP. There are lots
    # of valid alternatives, so we will give examples of each. Note that
    # IP addresses DO NOT have to be in the range given above, they just
    # need to be on the same network. The order of the parameters in these
    # do not matter, it's permissible to give name, address and MAC in any
    # order.
    # Always allocate the host with Ethernet address 11:22:33:44:55:66
    # The IP address 192.168.0.60
    #dhcp-host=11:22:33:44:55:66,192.168.0.60
    # Always set the name of the host with hardware address
    # 11:22:33:44:55:66 to be "fred"
    #dhcp-host=11:22:33:44:55:66,fred
    # Always give the host with Ethernet address 11:22:33:44:55:66
    # the name fred and IP address 192.168.0.60 and lease time 45 minutes
    #dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
    # Give a host with Ethernet address 11:22:33:44:55:66 or
    # 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume
    # that these two Ethernet interfaces will never be in use at the same
    # time, and give the IP address to the second, even if it is already
    # in use by the first. Useful for laptops with wired and wireless
    # addresses.
    #dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60
    # Give the machine which says its name is "bert" IP address
    # 192.168.0.70 and an infinite lease
    #dhcp-host=bert,192.168.0.70,infinite
    # Always give the host with client identifier 01:02:02:04
    # the IP address 192.168.0.60
    #dhcp-host=id:01:02:02:04,192.168.0.60
    # Always give the host with client identifier "marjorie"
    # the IP address 192.168.0.60
    #dhcp-host=id:marjorie,192.168.0.60
    # Enable the address given for "judge" in /etc/hosts
    # to be given to a machine presenting the name "judge" when
    # it asks for a DHCP lease.
    #dhcp-host=judge
    # Never offer DHCP service to a machine whose Ethernet
    # address is 11:22:33:44:55:66
    #dhcp-host=11:22:33:44:55:66,ignore
    # Ignore any client-id presented by the machine with Ethernet
    # address 11:22:33:44:55:66. This is useful to prevent a machine
    # being treated differently when running under different OS's or
    # between PXE boot and OS boot.
    #dhcp-host=11:22:33:44:55:66,id:*
    # Send extra options which are tagged as "red" to
    # the machine with Ethernet address 11:22:33:44:55:66
    #dhcp-host=11:22:33:44:55:66,set:red
    # Send extra options which are tagged as "red" to
    # any machine with Ethernet address starting 11:22:33:
    #dhcp-host=11:22:33:*:*:*,set:red
    # Give a fixed IPv6 address and name to client with
    # DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2
    # Note the MAC addresses CANNOT be used to identify DHCPv6 clients.
    # Note also the they [] around the IPv6 address are obilgatory.
    #dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5]
    # Ignore any clients which are not specified in dhcp-host lines
    # or /etc/ethers. Equivalent to ISC "deny unknown-clients".
    # This relies on the special "known" tag which is set when
    # a host is matched.
    #dhcp-ignore=tag:!known
    # Send extra options which are tagged as "red" to any machine whose
    # DHCP vendorclass string includes the substring "Linux"
    #dhcp-vendorclass=set:red,Linux
    # Send extra options which are tagged as "red" to any machine one
    # of whose DHCP userclass strings includes the substring "accounts"
    #dhcp-userclass=set:red,accounts
    # Send extra options which are tagged as "red" to any machine whose
    # MAC address matches the pattern.
    #dhcp-mac=set:red,00:60:8C:*:*:*
    # If this line is uncommented, dnsmasq will read /etc/ethers and act
    # on the ethernet-address/IP pairs found there just as if they had
    # been given as --dhcp-host options. Useful if you keep
    # MAC-address/host mappings there for other purposes.
    #read-ethers
    # Send options to hosts which ask for a DHCP lease.
    # See RFC 2132 for details of available options.
    # Common options can be given to dnsmasq by name:
    # run "dnsmasq --help dhcp" to get a list.
    # Note that all the common settings, such as netmask and
    # broadcast address, DNS server and default route, are given
    # sane defaults by dnsmasq. You very likely will not need
    # any dhcp-options. If you use Windows clients and Samba, there
    # are some options which are recommended, they are detailed at the
    # end of this section.
    # Override the default route supplied by dnsmasq, which assumes the
    # router is the same machine as the one running dnsmasq.
    #dhcp-option=3,1.2.3.4
    # Do the same thing, but using the option name
    #dhcp-option=option:router,1.2.3.4
    # Override the default route supplied by dnsmasq and send no default
    # route at all. Note that this only works for the options sent by
    # default (1, 3, 6, 12, 28) the same line will send a zero-length option
    # for all other option numbers.
    #dhcp-option=3
    # Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
    #dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5
    # Send DHCPv6 option. Note [] around IPv6 addresses.
    #dhcp-option=option6:dns-server,[1234::77],[1234::88]
    # Send DHCPv6 option for namservers as the machine running
    # dnsmasq and another.
    #dhcp-option=option6:dns-server,[::],[1234::88]
    # Ask client to poll for option changes every six hours. (RFC4242)
    #dhcp-option=option6:information-refresh-time,6h
    # Set the NTP time server address to be the same machine as
    # is running dnsmasq
    #dhcp-option=42,0.0.0.0
    # Set the NIS domain name to "welly"
    #dhcp-option=40,welly
    # Set the default time-to-live to 50
    #dhcp-option=23,50
    # Set the "all subnets are local" flag
    #dhcp-option=27,1
    # Send the etherboot magic flag and then etherboot options (a string).
    #dhcp-option=128,e4:45:74:68:00:00
    #dhcp-option=129,NIC=eepro100
    # Specify an option which will only be sent to the "red" network
    # (see dhcp-range for the declaration of the "red" network)
    # Note that the tag: part must precede the option: part.
    #dhcp-option = tag:red, option:ntp-server, 192.168.1.1
    # The following DHCP options set up dnsmasq in the same way as is specified
    # for the ISC dhcpcd in
    # http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
    # adapted for a typical dnsmasq installation where the host running
    # dnsmasq is also the host running samba.
    # you may want to uncomment some or all of them if you use
    # Windows clients and Samba.
    #dhcp-option=19,0 # option ip-forwarding off
    #dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
    #dhcp-option=45,0.0.0.0 # netbios datagram distribution server
    #dhcp-option=46,8 # netbios node type
    # Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave.
    #dhcp-option=252,"\n"
    # Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client
    # probably doesn't support this......
    #dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com
    # Send RFC-3442 classless static routes (note the netmask encoding)
    #dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8
    # Send vendor-class specific options encapsulated in DHCP option 43.
    # The meaning of the options is defined by the vendor-class so
    # options are sent only when the client supplied vendor class
    # matches the class given here. (A substring match is OK, so "MSFT"
    # matches "MSFT" and "MSFT 5.0"). This example sets the
    # mtftp address to 0.0.0.0 for PXEClients.
    #dhcp-option=vendor:PXEClient,1,0.0.0.0
    # Send microsoft-specific option to tell windows to release the DHCP lease
    # when it shuts down. Note the "i" flag, to tell dnsmasq to send the
    # value as a four-byte integer - that's what microsoft wants. See
    # http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true
    #dhcp-option=vendor:MSFT,2,1i
    # Send the Encapsulated-vendor-class ID needed by some configurations of
    # Etherboot to allow is to recognise the DHCP server.
    #dhcp-option=vendor:Etherboot,60,"Etherboot"
    # Send options to PXELinux. Note that we need to send the options even
    # though they don't appear in the parameter request list, so we need
    # to use dhcp-option-force here.
    # See http://syslinux.zytor.com/pxe.php#special for details.
    # Magic number - needed before anything else is recognised
    #dhcp-option-force=208,f1:00:74:7e
    # Configuration file name
    #dhcp-option-force=209,configs/common
    # Path prefix
    #dhcp-option-force=210,/tftpboot/pxelinux/files/
    # Reboot time. (Note 'i' to send 32-bit value)
    #dhcp-option-force=211,30i
    # Set the boot filename for netboot/PXE. You will only need
    # this is you want to boot machines over the network and you will need
    # a TFTP server; either dnsmasq's built in TFTP server or an
    # external one. (See below for how to enable the TFTP server.)
    #dhcp-boot=pxelinux.0
    # The same as above, but use custom tftp-server instead machine running dnsmasq
    #dhcp-boot=pxelinux,server.name,192.168.1.100
    # Boot for Etherboot gPXE. The idea is to send two different
    # filenames, the first loads gPXE, and the second tells gPXE what to
    # load. The dhcp-match sets the gpxe tag for requests from gPXE.
    #dhcp-match=set:gpxe,175 # gPXE sends a 175 option.
    #dhcp-boot=tag:!gpxe,undionly.kpxe
    #dhcp-boot=mybootimage
    # Encapsulated options for Etherboot gPXE. All the options are
    # encapsulated within option 175
    #dhcp-option=encap:175, 1, 5b # priority code
    #dhcp-option=encap:175, 176, 1b # no-proxydhcp
    #dhcp-option=encap:175, 177, string # bus-id
    #dhcp-option=encap:175, 189, 1b # BIOS drive code
    #dhcp-option=encap:175, 190, user # iSCSI username
    #dhcp-option=encap:175, 191, pass # iSCSI password
    # Test for the architecture of a netboot client. PXE clients are
    # supposed to send their architecture as option 93. (See RFC 4578)
    #dhcp-match=peecees, option:client-arch, 0 #x86-32
    #dhcp-match=itanics, option:client-arch, 2 #IA64
    #dhcp-match=hammers, option:client-arch, 6 #x86-64
    #dhcp-match=mactels, option:client-arch, 7 #EFI x86-64
    # Do real PXE, rather than just booting a single file, this is an
    # alternative to dhcp-boot.
    #pxe-prompt="What system shall I netboot?"
    # or with timeout before first available action is taken:
    #pxe-prompt="Press F8 for menu.", 60
    # Available boot services. for PXE.
    #pxe-service=x86PC, "Boot from local disk"
    # Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server.
    #pxe-service=x86PC, "Install Linux", pxelinux
    # Loads <tftp-root>/pxelinux.0 from TFTP server at 1.2.3.4.
    # Beware this fails on old PXE ROMS.
    #pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4
    # Use bootserver on network, found my multicast or broadcast.
    #pxe-service=x86PC, "Install windows from RIS server", 1
    # Use bootserver at a known IP address.
    #pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4
    # If you have multicast-FTP available,
    # information for that can be passed in a similar way using options 1
    # to 5. See page 19 of
    # http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf
    # Enable dnsmasq's built-in TFTP server
    #enable-tftp
    # Set the root directory for files available via FTP.
    #tftp-root=/var/ftpd
    # Make the TFTP server more secure: with this set, only files owned by
    # the user dnsmasq is running as will be send over the net.
    #tftp-secure
    # This option stops dnsmasq from negotiating a larger blocksize for TFTP
    # transfers. It will slow things down, but may rescue some broken TFTP
    # clients.
    #tftp-no-blocksize
    # Set the boot file name only when the "red" tag is set.
    #dhcp-boot=net:red,pxelinux.red-net
    # An example of dhcp-boot with an external TFTP server: the name and IP
    # address of the server are given after the filename.
    # Can fail with old PXE ROMS. Overridden by --pxe-service.
    #dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
    # If there are multiple external tftp servers having a same name
    # (using /etc/hosts) then that name can be specified as the
    # tftp_servername (the third option to dhcp-boot) and in that
    # case dnsmasq resolves this name and returns the resultant IP
    # addresses in round robin fasion. This facility can be used to
    # load balance the tftp load among a set of servers.
    #dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name
    # Set the limit on DHCP leases, the default is 150
    #dhcp-lease-max=150
    # The DHCP server needs somewhere on disk to keep its lease database.
    # This defaults to a sane location, but if you want to change it, use
    # the line below.
    #dhcp-leasefile=/var/lib/misc/dnsmasq.leases
    # Set the DHCP server to authoritative mode. In this mode it will barge in
    # and take over the lease for any client which broadcasts on the network,
    # whether it has a record of the lease or not. This avoids long timeouts
    # when a machine wakes up on a new network. DO NOT enable this if there's
    # the slightest chance that you might end up accidentally configuring a DHCP
    # server for your campus/company accidentally. The ISC server uses
    # the same option, and this URL provides more information:
    # http://www.isc.org/files/auth.html
    #dhcp-authoritative
    # Run an executable when a DHCP lease is created or destroyed.
    # The arguments sent to the script are "add" or "del",
    # then the MAC address, the IP address and finally the hostname
    # if there is one.
    #dhcp-script=/bin/echo
    # Set the cachesize here.
    #cache-size=150
    # If you want to disable negative caching, uncomment this.
    #no-negcache
    # Normally responses which come from /etc/hosts and the DHCP lease
    # file have Time-To-Live set as zero, which conventionally means
    # do not cache further. If you are happy to trade lower load on the
    # server for potentially stale date, you can set a time-to-live (in
    # seconds) here.
    #local-ttl=
    # If you want dnsmasq to detect attempts by Verisign to send queries
    # to unregistered .com and .net hosts to its sitefinder service and
    # have dnsmasq instead return the correct NXDOMAIN response, uncomment
    # this line. You can add similar lines to do the same for other
    # registries which have implemented wildcard A records.
    #bogus-nxdomain=64.94.110.11
    # If you want to fix up DNS results from upstream servers, use the
    # alias option. This only works for IPv4.
    # This alias makes a result of 1.2.3.4 appear as 5.6.7.8
    #alias=1.2.3.4,5.6.7.8
    # and this maps 1.2.3.x to 5.6.7.x
    #alias=1.2.3.0,5.6.7.0,255.255.255.0
    # and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40
    #alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0
    # Change these lines if you want dnsmasq to serve MX records.
    # Return an MX record named "maildomain.com" with target
    # servermachine.com and preference 50
    #mx-host=maildomain.com,servermachine.com,50
    # Set the default target for MX records created using the localmx option.
    #mx-target=servermachine.com
    # Return an MX record pointing to the mx-target for all local
    # machines.
    #localmx
    # Return an MX record pointing to itself for all local machines.
    #selfmx
    # Change the following lines if you want dnsmasq to serve SRV
    # records. These are useful if you want to serve ldap requests for
    # Active Directory and other windows-originated DNS requests.
    # See RFC 2782.
    # You may add multiple srv-host lines.
    # The fields are <name>,<target>,<port>,<priority>,<weight>
    # If the domain part if missing from the name (so that is just has the
    # service and protocol sections) then the domain given by the domain=
    # config option is used. (Note that expand-hosts does not need to be
    # set for this to work.)
    # A SRV record sending LDAP for the example.com domain to
    # ldapserver.example.com port 389
    #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
    # A SRV record sending LDAP for the example.com domain to
    # ldapserver.example.com port 389 (using domain=)
    #domain=example.com
    #srv-host=_ldap._tcp,ldapserver.example.com,389
    # Two SRV records for LDAP, each with different priorities
    #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
    #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
    # A SRV record indicating that there is no LDAP server for the domain
    # example.com
    #srv-host=_ldap._tcp.example.com
    # The following line shows how to make dnsmasq serve an arbitrary PTR
    # record. This is useful for DNS-SD. (Note that the
    # domain-name expansion done for SRV records _does_not
    # occur for PTR records.)
    #ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
    # Change the following lines to enable dnsmasq to serve TXT records.
    # These are used for things like SPF and zeroconf. (Note that the
    # domain-name expansion done for SRV records _does_not
    # occur for TXT records.)
    #Example SPF.
    #txt-record=example.com,"v=spf1 a -all"
    #Example zeroconf
    #txt-record=_http._tcp.example.com,name=value,paper=A4
    # Provide an alias for a "local" DNS name. Note that this _only_ works
    # for targets which are names from DHCP or /etc/hosts. Give host
    # "bert" another name, bertrand
    #cname=bertand,bert
    # For debugging purposes, log each DNS query as it passes through
    # dnsmasq.
    #log-queries
    # Log lots of extra information about DHCP transactions.
    #log-dhcp
    # Include a another lot of configuration options.
    #conf-file=/etc/dnsmasq-resolvconf.conf
    #conf-dir=/etc/dnsmasq.d
    domain-needed
    interface=lo
    # If dnsmasq is compiled for DBus then we can take
    # advantage of not having to restart dnsmasq.
    enable-dbus
    conf-file=/etc/dnsmasq-conf.conf
    resolv-file=/etc/dnsmasq-resolv.conf
    Logs:
    May 23 00:01:06 panzor systemd[1]: Failed to start A lightweight DHCP and caching DNS server.
    May 23 00:01:10 panzor dhcpcd[27267]: dhcpcd not running
    May 23 00:01:10 panzor kernel: [ 7771.282756] iwl4965 0000:03:00.0: Can't stop Rx DMA.
    May 23 00:01:10 panzor dhcpcd[27294]: dhcpcd not running
    May 23 00:01:11 panzor dhcpcd[27330]: dhcpcd not running
    May 23 00:01:14 panzor dhcpcd[27373]: wlan0: sendmsg: Cannot assign requested address
    May 23 00:01:18 panzor dhcpcd[27373]: wlan0: sendmsg: Operation not permitted
    May 23 00:01:22 panzor dhcpcd[27395]: wlan0: sendmsg: Operation not permitted
    May 23 00:01:26 panzor dhcpcd[27395]: wlan0: sendmsg: Operation not permitted
    For domain filtration, if I remember correctly, I am using this
    https://bbs.archlinux.org/viewtopic.php?id=139784

Maybe you are looking for