You are not logged in.

#1 2018-04-14 13:20:15

hargoniX
Member
Registered: 2018-02-23
Posts: 9

netctl DNS server selection

I set up an own DNS server in my network yesterday and now tried to configure netctl to use it with:


Description='custom DNS profile'
Interface=wlp3s0f0u3
Connection=wireless
Security=wpa
ESSID=FIREBIRD
DNS=('192.168.188.231')
IP=dhcp
Key=mygreatkey

However my resolv.conf always looks like

# Generated by resolvconf
domain fritz.box
nameserver 192.168.188.1
nameserver 192.168.188.231

after i start the profile, so my machine always uses the nameserver it gets from the DHCP server instead of my own.

How can I configure netctl to only use my DNS server and ignore the one from DHCP

Offline

#2 2018-04-14 13:24:52

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: netctl DNS server selection

How about just editing the config of your DHCP server to provide the correct DNS address?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-04-14 13:28:17

hargoniX
Member
Registered: 2018-02-23
Posts: 9

Re: netctl DNS server selection

I dont have access to the router so i can not do that.

Offline

#4 2018-04-14 14:26:51

seth
Member
Registered: 2012-09-03
Posts: 51,028

Re: netctl DNS server selection

Tried

DHCPClient=dhcpcd --nohook resolv.conf

?

Offline

#5 2018-04-14 15:16:44

hargoniX
Member
Registered: 2018-02-23
Posts: 9

Re: netctl DNS server selection

Did not work.

Offline

#6 2018-04-14 15:58:42

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: netctl DNS server selection

You can try this. According to the source, setting DhcpcdOptions should be possible
https://git.archlinux.org/netctl.git/tr … hcp/dhcpcd

DHCPClient=dhcpcd
DhcpcdOptions="-L --nohook resolv.conf"

But in any case, if DNS is set, then netctl should automatically prevent dhcpcd from running the resolv.conf hook.

    # If using own dns, tell dhcpcd to NOT replace resolv.conf
    [[ $DNS ]] && options+=" -C resolv.conf"

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2018-04-14 16:33:43

hargoniX
Member
Registered: 2018-02-23
Posts: 9

Re: netctl DNS server selection

I tried that too, did not work either. Maybe there is something wrong with my dhcpcd config?

Offline

#8 2018-04-14 19:12:34

seth
Member
Registered: 2012-09-03
Posts: 51,028

Re: netctl DNS server selection

Ruling out the d'ohh: you do have dhcpcd installed and in use (running) and are not defaulting to dhclient?

Offline

#9 2018-04-14 19:53:53

hargoniX
Member
Registered: 2018-02-23
Posts: 9

Re: netctl DNS server selection

Yes, I do.

Offline

#10 2018-04-16 09:45:53

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: netctl DNS server selection

Have you tried editing /etc/dhcpcd.conf?

Offline

Board footer

Powered by FluxBB