Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: network and dns is working but no internet

  1. #1

    Default network and dns is working but no internet

    I installed a fresh installation and configured my whole KDE desktop.
    I guess after "I activated samba or any other windows domain service"* the connection to the local network kept working, also samba is working perfect; but when an application or browser wants to connect to the internet, I get nothing;

    * not 100% sure that the problem appeared after configuring samba as I configured a lot of basic things on the first boot...

    I tried a lot of things like:
    • deleting /etc/resolv.conf
    • adding the opendns server ip to resolv.conf
    • rebooting several times
    • trying as root

    -> no result

    when I nslookup an url, like nslookup google.com I get the correct ip address.
    that works for all urls so i suppose the dns is working properly.

    I also disabled the buildin firewall with no result.

    What else can I do or test?
    it drives me crazy

    should I do a fresh install?
    can i do that with keeping my desktop configuration? (exept the network configuration)

    thanks in advance!

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,985

    Default Re: network and dns is working but no internet

    Hello,

    Welcome to the openSUSE forums.

    That said, we have some good habits here, like do not tell only, but show. E.g. you do not say
    when I nslookup an url, like nslookup google.com I get the correct ip address.
    but you show:
    Code:
    henk@boven:~> nslookup google.com 
    Server:         194.109.6.66 
    Address:        194.109.6.66#53 
    
    Non-authoritative answer: 
    Name:   google.com 
    Address: 172.217.168.238 
    Name:   google.com 
    Address: 2a00:1450:400e:80c::200e 
    
    henk@boven:~>
    (BTW, those CODE tags you get with the # button in the toolbar).

    You seem already have done some the checks (allthough you did not prove them by showing) that should be done (from bottom to top). Because you say you can connect within the LAN, I assume we can take it for granted that the NIC is up and has an IP address, That you can do the nslookup proves that you have some DNS server serving you. But we still have no prove that you can go through your router to the internet. So please do (and post):
    Code:
    ping -c1 195.135.221.161
    and
    Code:
    pig -c1 forums.opensuse.org
    Henk van Velden

  3. #3

    Default Re: network and dns is working but no internet

    ok I got you, here is the proof:

    Code:
    rogez@larissa:~> su
    Password:
    larissa:/home/rogez # ping -c1 195.135.221.161
    PING 195.135.221.161 (195.135.221.161) 56(84) bytes of data.
    64 bytes from 195.135.221.161: icmp_seq=1 ttl=52 time=36.7 ms
    
    --- 195.135.221.161 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 36.741/36.741/36.741/0.000 ms
    larissa:/home/rogez # nslookup google.com
    Server:         208.67.222.222
    Address:        208.67.222.222#53
    
    Non-authoritative answer:
    Name:   google.com
    Address: 216.58.208.110
    Name:   google.com
    Address: 2a00:1450:400e:80e::200e
    
    larissa:/home/rogez # nslookup google.be
    Server:         208.67.222.222
    Address:        208.67.222.222#53
    
    Non-authoritative answer:
    Name:   google.be
    Address: 142.250.179.131
    Name:   google.be
    Address: 2a00:1450:400e:801::2003
    
    larissa:/home/rogez # ping -c1 forums.opensuse.org
    ping: forums.opensuse.org: Name or service not known
    larissa:/home/rogez # pig -c1 forums.opensuse.org
    If 'pig' is not a typo you can use command-not-found to lookup the package that contains it, like this:
        cnf pig
    larissa:/home/rogez # ping 216.58.208.110
    PING 216.58.208.110 (216.58.208.110) 56(84) bytes of data.
    64 bytes from 216.58.208.110: icmp_seq=1 ttl=58 time=16.2 ms
    64 bytes from 216.58.208.110: icmp_seq=2 ttl=58 time=18.2 ms
    ^C
    --- 216.58.208.110 ping statistics ---
    6 packets transmitted, 6 received, 0% packet loss, time 5008ms
    rtt min/avg/max/mdev = 13.696/17.588/22.445/2.619 ms
    larissa:/home/rogez # ping rogez.be
    ping: rogez.be: Name or service not known
    larissa:/home/rogez # nslookup rogez.be
    Server:         208.67.222.222
    Address:        208.67.222.222#53
    
    Non-authoritative answer:
    Name:   rogez.be
    Address: 185.94.230.73
    Name:   rogez.be
    Address: 2a00:f10:13f:0:1c00:acff:fe00:136
    
    larissa:/home/rogez # ping 185.94.230.73
    PING 185.94.230.73 (185.94.230.73) 56(84) bytes of data.
    64 bytes from 185.94.230.73: icmp_seq=1 ttl=52 time=16.6 ms
    64 bytes from 185.94.230.73: icmp_seq=2 ttl=52 time=19.4 ms
    ^C
    --- 185.94.230.73 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3005ms
    rtt min/avg/max/mdev = 15.625/17.440/19.417/1.434 ms
    the strange thing is that I can ping an ip address but not an url, although the dns seems to work trough nslookup...

  4. #4
    Join Date
    Sep 2012
    Posts
    7,877

    Default Re: network and dns is working but no internet

    Quote Originally Posted by kleajmp View Post
    Code:
    larissa:/home/rogez # ping -c1 forums.opensuse.org
    ping: forums.opensuse.org: Name or service not known
    Show content /etc/nsswitch.conf (and any file in /etc/nsswitch.conf.d if there is any).

  5. #5

    Default Re: network and dns is working but no internet

    nsswitch.conf :
    Code:
    #
    # /etc/nsswitch.conf
    #
    # An example Name Service Switch config file. This file should be
    # sorted with the most-used services at the beginning.
    #
    # Valid databases are: aliases, ethers, group, gshadow, hosts,
    # initgroups, netgroup, networks, passwd, protocols, publickey,
    # rpc, services, and shadow.
    #
    # Valid service provider entries include (in alphabetical order):
    #
    #    compat            Use /etc files plus *_compat pseudo-db
    #    db            Use the pre-processed /var/db files
    #    dns            Use DNS (Domain Name Service)
    #    files            Use the local files in /etc
    #    hesiod            Use Hesiod (DNS) for user lookups
    #    nis            Use NIS (NIS version 2), also called YP
    #    nisplus            Use NIS+ (NIS version 3)
    #
    # See `info libc 'NSS Basics'` for more information.
    #
    # Commonly used alternative service providers (may need installation):
    #
    #    ldap            Use LDAP directory server
    #    myhostname        Use systemd host names
    #    mymachines        Use systemd machine names
    #    mdns*, mdns*_minimal    Use Avahi mDNS/DNS-SD
    #    resolve            Use systemd resolved resolver
    #    sss            Use System Security Services Daemon (sssd)
    #    systemd            Use systemd for dynamic user option
    #    winbind            Use Samba winbind support
    #    wins            Use Samba wins support
    #    wrapper            Use wrapper module for testing
    #
    # Notes:
    #
    # 'sssd' performs its own 'files'-based caching, so it should generally
    # come before 'files'.
    #
    # WARNING: Running nscd with a secondary caching service like sssd may
    #        lead to unexpected behaviour, especially with how long
    #        entries are cached.
    #
    # Installation instructions:
    #
    # To use 'db', install the appropriate package(s) (provide 'makedb' and
    # libnss_db.so.*), and place the 'db' in front of 'files' for entries
    # you want to be looked up first in the databases, like this:
    #
    # passwd:    db files
    # shadow:    db files
    # group:     db files
    
    passwd:        compat
    group:        compat
    shadow:        compat
    # Allow initgroups to default to the setting for group.
    # initgroups:    compat
    
    hosts:      [NOTFOUND=return] files mdns_minimal dns
    networks:    files dns
    
    aliases:    files usrfiles
    ethers:        files usrfiles
    gshadow:    files usrfiles
    netgroup:    files nis
    protocols:    files usrfiles
    publickey:    files
    rpc:        files usrfiles
    services:    files usrfiles
    
    automount:    files nis
    bootparams:    files
    netmasks:    files
    /etc/nsswitch.conf.d does not excist;

  6. #6
    Join Date
    Mar 2020
    Location
    São Leopoldo, RS, Brazil
    Posts
    425

    Default Re: network and dns is working but no internet

    You're the second user (that I know of) reporting lack of internet access after configuring samba. Someone should file a bug report.

    The fix is simple, remove [NOTFOUND=return] from hosts line:

    Code:
    hosts:      files mdns_minimal dns
    openSUSE Tumbleweed

  7. #7
    Join Date
    Sep 2012
    Posts
    7,877

    Default Re: network and dns is working but no internet

    Quote Originally Posted by kleajmp View Post
    nsswitch.conf :
    Code:
    hosts:      [NOTFOUND=return] files mdns_minimal dns
    Here is the problem. This is the second report on this forum. Something went wrong during some package installation/update. If you can remember when this problem started you could try to guess suspected package (version).

    [NOTFOUND=return] is expected to be after mdns_minimal. You could also check the difference between /etc/nsswitch.conf and /usr/etc/nsswitch,conf and probably just delete /etc version.

    You do not really need mdns unless you have local network with many hosts and want to avoid maintaining /etc/hosts or local DNS manually.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,985

    Default Re: network and dns is working but no internet

    Quote Originally Posted by kleajmp View Post
    ok I got you, here is the proof:

    Code:
    rogez@larissa:~> su
    Password:
    larissa:/home/rogez # ping -c1 195.135.221.161
    PING 195.135.221.161 (195.135.221.161) 56(84) bytes of data.
    64 bytes from 195.135.221.161: icmp_seq=1 ttl=52 time=36.7 ms
    
    --- 195.135.221.161 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 36.741/36.741/36.741/0.000 ms
    larissa:/home/rogez # nslookup google.com
    Server:         208.67.222.222
    Address:        208.67.222.222#53
    
    Non-authoritative answer:
    Name:   google.com
    Address: 216.58.208.110
    Name:   google.com
    Address: 2a00:1450:400e:80e::200e
    
    larissa:/home/rogez # nslookup google.be
    Server:         208.67.222.222
    Address:        208.67.222.222#53
    
    Non-authoritative answer:
    Name:   google.be
    Address: 142.250.179.131
    Name:   google.be
    Address: 2a00:1450:400e:801::2003
    
    larissa:/home/rogez # ping -c1 forums.opensuse.org
    ping: forums.opensuse.org: Name or service not known
    larissa:/home/rogez # pig -c1 forums.opensuse.org
    If 'pig' is not a typo you can use command-not-found to lookup the package that contains it, like this:
        cnf pig
    larissa:/home/rogez # ping 216.58.208.110
    PING 216.58.208.110 (216.58.208.110) 56(84) bytes of data.
    64 bytes from 216.58.208.110: icmp_seq=1 ttl=58 time=16.2 ms
    64 bytes from 216.58.208.110: icmp_seq=2 ttl=58 time=18.2 ms
    ^C
    --- 216.58.208.110 ping statistics ---
    6 packets transmitted, 6 received, 0% packet loss, time 5008ms
    rtt min/avg/max/mdev = 13.696/17.588/22.445/2.619 ms
    larissa:/home/rogez # ping rogez.be
    ping: rogez.be: Name or service not known
    larissa:/home/rogez # nslookup rogez.be
    Server:         208.67.222.222
    Address:        208.67.222.222#53
    
    Non-authoritative answer:
    Name:   rogez.be
    Address: 185.94.230.73
    Name:   rogez.be
    Address: 2a00:f10:13f:0:1c00:acff:fe00:136
    
    larissa:/home/rogez # ping 185.94.230.73
    PING 185.94.230.73 (185.94.230.73) 56(84) bytes of data.
    64 bytes from 185.94.230.73: icmp_seq=1 ttl=52 time=16.6 ms
    64 bytes from 185.94.230.73: icmp_seq=2 ttl=52 time=19.4 ms
    ^C
    --- 185.94.230.73 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3005ms
    rtt min/avg/max/mdev = 15.625/17.440/19.417/1.434 ms
    the strange thing is that I can ping an ip address but not an url, although the dns seems to work trough nslookup...
    Well, I did not ask you to do those ping commands as root.And the two I asked you is enough. I have no idea why all those google things come between the two.

    Also, when you need to do things as root (not for ping and nslookup), do not use
    Code:
    su
    but
    Code:
    su -
    In any case, while I was dining, you already got good advice on the base of what you showed.
    Henk van Velden

  9. #9

    Default Re: network and dns is working but no internet

    danku meester henk, ik hoop dat u lekker gegeten hebt

    now what is the difference between su and su - ?
    I really don't know?

    Now I finished my dining and I go boot immediately to opensuse and remove the "[NOTFOUND=return]" to see if that is the solution, sounds amazing if that would be it..!

    thanks all, I keep u informed!

  10. #10

    Default Re: network and dns is working but no internet

    believe it or not, but removing "[NOTFOUND=return]" from "nsswitch.conf" just fixed it! thanks a million times! now I am very curious how that this all happened...


    • so I am like the second case who had this issue after installing samba? how come? (someone wrote that here somewhere)
    • "nsswitch.conf" is used for what exactly? ("name service switch": a switch for different name servers defined on the machine?)
    • what was physically happening on my machine? I guess some loop? but where and how exactly? can someone describe?


    thanks for learning this new opensuse user see the light here! I really appreciate the quick help I got here. No commercial brand is doing that for it's customers .
    finally have internet on my suse ))

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •