Alpine Linux sometimes DNS is not resolved

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Sometimes when I run the commands:
sudo apk update && sudo apk upgrade
Over Alpine linux fails to update the packages even if connected to internet. But if I do sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" I manage to dowload them. But this solution:
- Causes me frustration I need to set dns all over the time.
- Sometimes
/etc/resolv.confgets overriden by itself.
How I can have a more permanent solution.
resolv.conf alpine-linux
add a comment |Â
up vote
0
down vote
favorite
Sometimes when I run the commands:
sudo apk update && sudo apk upgrade
Over Alpine linux fails to update the packages even if connected to internet. But if I do sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" I manage to dowload them. But this solution:
- Causes me frustration I need to set dns all over the time.
- Sometimes
/etc/resolv.confgets overriden by itself.
How I can have a more permanent solution.
resolv.conf alpine-linux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Sometimes when I run the commands:
sudo apk update && sudo apk upgrade
Over Alpine linux fails to update the packages even if connected to internet. But if I do sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" I manage to dowload them. But this solution:
- Causes me frustration I need to set dns all over the time.
- Sometimes
/etc/resolv.confgets overriden by itself.
How I can have a more permanent solution.
resolv.conf alpine-linux
Sometimes when I run the commands:
sudo apk update && sudo apk upgrade
Over Alpine linux fails to update the packages even if connected to internet. But if I do sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" I manage to dowload them. But this solution:
- Causes me frustration I need to set dns all over the time.
- Sometimes
/etc/resolv.confgets overriden by itself.
How I can have a more permanent solution.
resolv.conf alpine-linux
edited May 4 at 0:14
asked May 3 at 21:21
Dimitrios Desyllas
1599
1599
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You can solve the problem by installing the dhclient package. For the last time enable Google's DNS servers by runing for the last time:
sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
Then run this cocktail of commands:
sudo apk update && sudo apk upgrade && sudo apk add dhclient
In order to get the fresh packages and install the dhclient. Then configure the /etc/dhcp/dhclient.conf and put the following:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
And restart the networking:
sudo rc-service networking restart
Optionally you can confirm that works if you run:
sudo reboot
In either case you can confirm that dins is resolved by pinging the google.
ping google.com
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You can solve the problem by installing the dhclient package. For the last time enable Google's DNS servers by runing for the last time:
sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
Then run this cocktail of commands:
sudo apk update && sudo apk upgrade && sudo apk add dhclient
In order to get the fresh packages and install the dhclient. Then configure the /etc/dhcp/dhclient.conf and put the following:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
And restart the networking:
sudo rc-service networking restart
Optionally you can confirm that works if you run:
sudo reboot
In either case you can confirm that dins is resolved by pinging the google.
ping google.com
add a comment |Â
up vote
0
down vote
accepted
You can solve the problem by installing the dhclient package. For the last time enable Google's DNS servers by runing for the last time:
sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
Then run this cocktail of commands:
sudo apk update && sudo apk upgrade && sudo apk add dhclient
In order to get the fresh packages and install the dhclient. Then configure the /etc/dhcp/dhclient.conf and put the following:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
And restart the networking:
sudo rc-service networking restart
Optionally you can confirm that works if you run:
sudo reboot
In either case you can confirm that dins is resolved by pinging the google.
ping google.com
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You can solve the problem by installing the dhclient package. For the last time enable Google's DNS servers by runing for the last time:
sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
Then run this cocktail of commands:
sudo apk update && sudo apk upgrade && sudo apk add dhclient
In order to get the fresh packages and install the dhclient. Then configure the /etc/dhcp/dhclient.conf and put the following:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
And restart the networking:
sudo rc-service networking restart
Optionally you can confirm that works if you run:
sudo reboot
In either case you can confirm that dins is resolved by pinging the google.
ping google.com
You can solve the problem by installing the dhclient package. For the last time enable Google's DNS servers by runing for the last time:
sudo su "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
Then run this cocktail of commands:
sudo apk update && sudo apk upgrade && sudo apk add dhclient
In order to get the fresh packages and install the dhclient. Then configure the /etc/dhcp/dhclient.conf and put the following:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
And restart the networking:
sudo rc-service networking restart
Optionally you can confirm that works if you run:
sudo reboot
In either case you can confirm that dins is resolved by pinging the google.
ping google.com
edited May 5 at 16:47
answered May 3 at 21:21
Dimitrios Desyllas
1599
1599
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f441664%2falpine-linux-sometimes-dns-is-not-resolved%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password