dnsmasq запускается, но игнорирует сервер имен - локальный интерфейс - PullRequest
1 голос
/ 06 августа 2020

Я работаю над Ubuntu. Служба dnsmasq запускается успешно, но игнорирует сервер имен 127.0.0.1 в файле /etc/resolv.conf.

Вот файл / etc / resolv.conf

nameserver 127.0.0.1
nameserver 8.8.8.8

Вот результат dnsmasq status , пока сервер rails работает в фоновом режиме.

dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-08-06 02:38:47 IST; 9s ago
    Process: 85182 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
    Process: 85183 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
    Process: 85211 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
   Main PID: 85210 (dnsmasq)
      Tasks: 1 (limit: 9356)
     Memory: 1.7M
     CGroup: /system.slice/dnsmasq.service
             └─85210 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-servic>

Aug 06 02:38:47 hp-HP-Pavilion-Notebook systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85182]: dnsmasq: syntax check OK.
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: started, version 2.80 cachesize 150
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: DNS service limited to local subnets
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack>
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: reading /etc/resolv.conf
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: ignoring nameserver 127.0.0.1 - local interface
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: using nameserver 8.8.8.8#53
Aug 06 02:38:47 hp-HP-Pavilion-Notebook dnsmasq[85210]: read /etc/hosts - 7 addresses
Aug 06 02:38:47 hp-HP-Pavilion-Notebook systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.

Почему сервер 127.0.0.1 игнорируется?

...