View previous topic :: View next topic |
Author |
Message |
kmb346 n00b
Joined: 14 Aug 2018 Posts: 5 Location: Japan
|
Posted: Tue Aug 14, 2018 3:09 pm Post subject: Can ping and access Google but no other sites on internet |
|
|
I recently installed Gentoo version 4.9.95 and got everything up and running, I installed KDE Plasma as well without any trouble. The internet was working perfectly and I could access all sites. However, a few days ago I tried to open some websites in my browser (Chromium and the built-in browser on Plasma, Falkon) but I keep getting error messages saying "This site can't be reached". The only site I can access is www.google.com. I can even search, but if I try to open a page i get the error message.
I can ping Google as well, but no other sites. When I ping other sites I get an error "Temporary failure in name resolution"
I looked around but could not find any real similar issues. I am new to Gentoo and am not very familiar with networking.
I checked my newtwork interface and I have an enp0 network and it says it is up so I am not sure what is causing the issue.
Any help would be appreciated. Please let me know what I can post that would be helpful in solving this.
Thanks in advance. |
|
Back to top |
|
|
papas Tux's lil' helper
Joined: 01 Dec 2014 Posts: 141 Location: Athens
|
Posted: Tue Aug 14, 2018 3:37 pm Post subject: |
|
|
I am not sure, but try add another dns server in rour resolv.conf for example something like this:
Code: | echo "nameserver 8.8.8.8" >> /etc/resolv.conf |
|
|
Back to top |
|
|
kmb346 n00b
Joined: 14 Aug 2018 Posts: 5 Location: Japan
|
Posted: Tue Aug 14, 2018 5:24 pm Post subject: |
|
|
Thank you for your fast reply.
My internet is back up and running! Thanks so much for your advice.
When I added the nameserver to the /etc/resolv.conf, the file kept getting modified automatically and the line I added was was removed.
I had to create a new file called /etc/resolv.conf.tail and add the nameserver to that file.
Thanks again, I was pulling my hair out trying to find a solution. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Wed Aug 15, 2018 1:26 am Post subject: |
|
|
Your change is a workaround, not a fix. Although well-known, that nameserver may not be optimal for you. You would likely be better off using one local to your area. The network scripts should configure DNS for you as part of activating your network. How do you acquire an IP address? Static configuration? DHCP? Please show us the contents of /etc/conf.d/net. |
|
Back to top |
|
|
kmb346 n00b
Joined: 14 Aug 2018 Posts: 5 Location: Japan
|
Posted: Wed Aug 15, 2018 5:15 am Post subject: |
|
|
Thanks for your reply Hu.
I do not have the /etc/conf.d/net file. Maybe it got deleted, I checked the hidden files as well and nothing? Could the absence of this file be the cause of my issue? Do I need to manually create the file or is there a way to recreate it somehow?
I am not running any static configuration that I am aware of, my system is running DHCPCD.
If you need any additional information please let me know and I will post it.
Thanks again. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Fri Aug 31, 2018 1:29 am Post subject: |
|
|
If you use dhcpcd, and do not configure it otherwise, then it should configure your nameserver from what your DHCP server offers. If your DHCP server is not offering a nameserver, you would have a problem. What is the output of dhcpcd -U eth0 (or such other interface as udev may have mangled for you)? |
|
Back to top |
|
|
orion777 Apprentice
Joined: 15 Mar 2017 Posts: 207 Location: Riga, Latvia
|
Posted: Sat Sep 01, 2018 8:32 am Post subject: |
|
|
To Note: if You have any capacity restrictions (typically, when 3G/LTE services are used) and it is over, sometimes network providers block all traffic EXCEPT google traffic. This is done to be able to redirect You to its webpage like "your traffic is over, please pay more, and so.." using google DNS server 8.8.8.8. |
|
Back to top |
|
|
kmb346 n00b
Joined: 14 Aug 2018 Posts: 5 Location: Japan
|
Posted: Sun Sep 02, 2018 3:50 am Post subject: |
|
|
When I try dhcpd -U eth0 I get an error:
eth0: dhcp_dump: No such file or directory
I did ifconfig -a and got the following result:
Code: |
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 240f:95:71f6:1:689f:291a:add0:5d75 prefixlen 64 scopeid 0x0<global>
inet6 fe80::fdf7:5cca:50d8:2b15 prefixlen 64 scopeid 0x20<link>
ether 70:85:c2:55:94:77 txqueuelen 1000 (Ethernet)
RX packets 41746 bytes 38130702 (36.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 35920 bytes 5471789 (5.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xdf000000-df020000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sit0: flags=128<NOARP> mtu 1480
sit txqueuelen 1 (IPv6-in-IPv4)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
So I tried dhcpcd -U enp0s31f6:
Code: |
broadcast_address=192.168.0.255
dhcp_lease_time=3600
dhcp_message_type=5
dhcp_rebinding_time=3150
dhcp_renewal_time=1800
dhcp_server_identifier=192.168.0.1
domain_name_servers=192.168.0.1
ip_address=192.168.0.7
network_number=192.168.0.0
routers=192.168.0.1
subnet_cidr=24
subnet_mask=255.255.255.0
dhcp6_dump: enp0s31f6: No such file or directory
|
Also, just for reference, I was going through this post, networking for dummies, but I got stuck because when I do ls /etc/init.d/net, I found that i have no file or directory named "net" in /etc/init.d/.
@orion777 Thanks for your insight as well. I do not think I have any capacity restrictions and my internet was working when I initially installed Gentoo. I am not a real heavy network user as it is and have never experienced any problems on my other devices.
[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu] |
|
Back to top |
|
|
saturnalia0 Tux's lil' helper
Joined: 13 Oct 2016 Posts: 134
|
Posted: Sun Sep 02, 2018 4:37 pm Post subject: |
|
|
/etc/resolv.conf is the ultimate resolver. See man resolv.conf(5). Write your DNS servers of choice to it and then chattr +i /etc/resolv.conf and no software will overwrite it.
If your only issue is a broken DNS config file then that is a fix. No need to worry about other net config files. If it ain't broken don't fix it. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Sun Sep 02, 2018 5:07 pm Post subject: |
|
|
Your DHCP server set itself as a DNS server. This may be fine, if it offers DNS service. What does dig www.gentoo.org @192.168.0.1 show?
saturnalia0: please never suggest using chattr +i for this. I've seen several users with weird problems that were ultimately traced to them blindly following that bit of advice. |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Mon Sep 03, 2018 11:22 am Post subject: |
|
|
saturnalia0,
That's what the /etc/resolv.head and /etc/resolv.tail files are for.
chattr +i is a horrible thing to do. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kmb346 n00b
Joined: 14 Aug 2018 Posts: 5 Location: Japan
|
Posted: Mon Sep 03, 2018 4:26 pm Post subject: |
|
|
Thanks everyone for your responses.
When I do dig www.gentoo.org @192.168.0.1 I get the following output:
Code: |
; <<>> DiG 9.11.2-P1 <<>> www.gentoo.org @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 23839
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 978994fa9115693a (echoed)
;; QUESTION SECTION:
;www.gentoo.org. IN A
;; Query time: 0 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Tue Sep 04 00:56:27 JST 2018
;; MSG SIZE rcvd: 55
|
It returns with status: SERVFAIL. I am guessing this means the DHCP server does not offer DNS service.
What would be the best way to resolve this? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Mon Sep 03, 2018 4:59 pm Post subject: |
|
|
kmb346,
Look in your router set up and see if the domain name server is turned off.
If its supposed be working by isn't, create the file /etc/resolv.conf.tail with your own name server entries.
Use your ISP provided nameservers as they will be fastest.
/etc/resolv.conf.tail is appended to /etc/resolv.conf, so if it suddenly starts working, or you move to another network, it will still jush work as your manual entries will be lower down the list than dhcpcd provided entries.
The chattr +i method will ensure that your system is not portable, since a properly working network would not be able to overwrite /etc/resolv.conf.
As an aside, you have a global scope IPv6 address
Code: | enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 240f:95:71f6:1:689f:291a:add0:5d75 prefixlen 64 scopeid 0x0<global> |
I hope you have a IPv6 firewall too as global IPv6 addresses are on the big bad internet unless you do something about it.
You should also have an IPv6 nameserver, it will work without but it defeats the purpose using IPv4 to resolve hostnames to IPv6 addresses. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|