You are not logged in.

#1 2014-07-12 04:59:08

jenia
Member
Registered: 2014-07-12
Posts: 43

how to use netctl to add a dns server?

Hello:

I have timeout erros on my machine.

I want to add a new dns

nameserver 8.8.8.8

to

/etc/resolve.conf

, but each time i close the file, it gets replaced.
I think i need to use netctl to add a dns entry to /etc/resolve.conf

Can someone please point out to me how its done?


Thanks in adance.

Offline

#2 2014-07-12 05:36:22

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: how to use netctl to add a dns server?

#DNS=('208.67.220.222' '208.67.222.220' '208.67.220.220' '208.67.222.222' '8.8.4.4' '8.8.8.8' '2620:0:ccc::2' '2620:0:ccd::2')

Offline

#3 2014-07-12 05:49:26

jenia
Member
Registered: 2014-07-12
Posts: 43

Re: how to use netctl to add a dns server?

okay thanks a lot.
can you please tell me something else:

Description='Wired'
Interface=en-any
Connection=ethernet
IP=static
Address=('192.168.1.15/24')
Gateway='192.168.1.1'
DNS=('192.168.1.1')

The entry Address, who's address? The machine's address on the network, like 192.168.1.102 or something like that?
Thats from arch wiki by the way.

Offline

#4 2014-07-12 07:57:48

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: how to use netctl to add a dns server?

The address of the machine you are configuring, of course.

Offline

#5 2014-07-12 09:14:06

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: how to use netctl to add a dns server?

'Address' is the static network IP and prefix of the machine you are configuring. here's mine for reference:

Description='Static ethernet (192.168.0.0/24) with IPv6'
Interface=enp3s0
Connection=ethernet
IP=static
Address=('192.168.0.2/24')
Gateway='192.168.0.1'
DNS='127.0.0.1'
#DNS=('208.67.220.222' '208.67.222.220' '208.67.220.220' '208.67.222.222' '8.8.4.4' '8.8.8.8' '2620:0:ccc::2' '2620:0:ccd::2')

## For IPv6 autoconfiguration
IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

## automation of scripts pre and post connect
ExecUpPost='/storage/Launchers/tSpeed || true'
ExecDownPre='/storage/Launchers/tSpeedReset || true'

my local IP is 192.168.0.2 and my router is 192.168.0.1

Last edited by HiImTye (2014-07-12 09:16:19)

Offline

#6 2014-07-15 16:23:00

jenia
Member
Registered: 2014-07-12
Posts: 43

Re: how to use netctl to add a dns server?

thanks a lot.

Offline

Board footer

Powered by FluxBB