You are not logged in.
I've tried to follow the instructions here: https://wiki.archlinux.org/index.php/dnsmasq
I just want to remap some addresses to localhost, so I've created a configuration file:
/etc/dnsmasq.conf
address=/mylocalserver/127.0.0.1
address=/my.local.server/127.0.0.1When I ping the first address, no problem it behaves exactly as expected:
# ping mylocalserver
PING mylocalserver (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.022 msBut for the second address:
# ping my.local.server
ping: my.local.server: Name or service not knownAny idea what I'm doing wrong?
Last edited by keeely (2019-06-25 13:01:20)
Offline
Is there a literal "local" in the name? The resolver might skip the local resolver (avahi/mdns related) - though that shouldn't happen for a .server TLD.
You could also start "dnsmasq -q" and check the log whether my.local.server is actually requested to dnsmasq.
Offline
Also, while following this: https://wiki.archlinux.org/index.php/Do … esolv.conf
I get this error:
# chattr +i /etc/resolv.conf
chattr: Operation not supported while reading flags on /etc/resolv.confOffline
stat /etc/resolv.confsymlink? why? do you also use systemd-networkd/resolved??
Offline
Is there a literal "local" in the name? The resolver might skip the local resolver (avahi/mdns related) - though that shouldn't happen for a .server TLD.
You could also start "dnsmasq -q" and check the log whether my.local.server is actually requested to dnsmasq.
Excellent point. I've removed 'local', same result.
Offline
Works for me:
$ ping -c4 my.local.server
PING my.local.server (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.076 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.091 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=4 ttl=64 time=0.096 ms
--- my.local.server ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 31ms
rtt min/avg/max/mdev = 0.074/0.084/0.096/0.011 msPost your /etc/resolv.conf and the output of:
$ file /etc/resolv.conf
$ drill my.local.serverOffline
stat /etc/resolv.confsymlink? why? do you also use systemd-networkd/resolved??
It seems it is:
File: /etc/resolv.conf -> /var/run/systemd/resolve/resolv.conf
I honestly don't know what I'm doing. This is my first time using systemd, so it may be as much about my lack of understanding of that rather than about Arch.
I've changed /etc/systemd/resolved.conf to set:
DNSStubListener=noWhich I thought was disabling the systemd resolved.
Last edited by keeely (2019-06-25 12:50:30)
Offline
Post your /etc/resolv.conf and the output of:
$ file /etc/resolv.conf $ drill my.local.server
[root@archlinux etc]# file /etc/resolv.conf
/etc/resolv.conf: symbolic link to /var/run/systemd/resolve/resolv.conf
[root@archlinux etc]# drill my.super.server
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 15569
;; flags: qr aa rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; my.super.server. IN A
;; ANSWER SECTION:
my.super.server. 0 IN A 127.0.0.1
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; Query time: 0 msec
;; SERVER: 127.0.0.1
;; WHEN: Tue Jun 25 12:50:24 2019
;; MSG SIZE rcvd: 49NB: Changed the name to remove 'local'
Offline
Systemd-resolved is not enabled by default nor does it create that symlink by default.
Delete the /etc/resolv.conf symlink and create a new file following https://wiki.archlinux.org/index.php/Dn … forwarding.
Offline
Systemd-resolved is not enabled by default nor does it create that symlink by default.
Delete the /etc/resolv.conf symlink and create a new file following https://wiki.archlinux.org/index.php/Dn … forwarding.
Gotcha. Yes I think that was my mistake, I somehow enabled resolved. Working now thank you very much.
Offline