Results 1 to 8 of 8

Thread: No access to internet / nslookup fails

  1. #1
    Join Date
    Jan 2024
    Beans
    4

    No access to internet / nslookup fails

    Hello

    I'm more familiar with windows, but I have to configure an ubuntu 22.04 as a virtual machine (virtual box).



    I thought if I took the same steps as under Windows it should work straight away. But it doesn't.

    Steps:

    1) Changed network setting of VBox to briding mode


    2) Configured the network interface, especially gateway





    What is actually sufficient under Windows is probably not sufficient in Ubunto.
    Normally this is a gateway issue, but a ping to 192.168.2.1 succeeds. But for some reason ubuntu don't use my configured gateway.

    Can anybody help me?
    Settings made in ubuntu

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: No access to internet / nslookup fails

    Good job choosing "bridged" - did you choose the NIC to be a virtio device? Same for the storage controller. Always choose the virtio device, when that is available. It is faster and has lower overhead than emulating hardware. While we are talking vbox settings, the amount of Display VRAM should be either the lowest possible value for Ubuntu Server or the highest possible value (128MB) for any Desktop. Enable 2D accel, but do not enable 3D accel.

    ubuntu desktop or ubuntu server?

    For networking to work, there are a few things that must be set correctly. Ask your network admin if you don't already know the answers.

    1. IP address - typically an IP like 192.168.1.31 - if it is a static IP, not provided by a DHCP server, then it must be outside the range of IPs that the DHCP gives out. You cannot just randomly pick any IP that you like. It has to be on the subnet that your router is managing and it cannot be used by any other device. I make DHCP range .200 and higher. .1-.199 are for static IPs that are manually configured. Keep them separated.
    2. netmask - in a home network, 255.255.255.0 is typical or in CIDR notation a /24 So, to really shorten things, the IP of 192.168.1.31/24 tells us the IP and netmask.
    3. gateway - often the IP of your router. 192.168.1.1 or 192.168.1.254 are common.
    4. 2 DNS server IPs. 1.0.0.1 and 1.1.1.1 are good.


    BTW, nslookup is deprecated and has been in Linux for about 10 yrs. Use the 'dig' command.

    If you can ping 1.1.1.1, you don't have a network problem, you only have a DNS issue. There are different methods to control the DNS. For most people, it is best to fine the Desktop Users Guide for your Desktop Environment and read the section on setting up networking.
    For Gnome, this is the page: https://help.ubuntu.com/lts/ubuntu-h...ddress.html.en
    XFCE, Mate, KDE all have slightly different tools for this.
    https://help.ubuntu.com/ has the official Ubuntu documentation, written so grandma can follow it almost always.

    BTW, if you are changing your network across multiple devices, and you may want to run a VPN server at home sometime in the future, it would be smart to change the subnet used by your router to a non-popular subnet. This will make setting up the VPN routing easier and avoid subnet collisions later. You'll need to be better at networking to run a VPN and setup the routing correctly, but just know that if the hotel or cafe you are in uses 192.168.1.x for their network, then your home network must be different from that or the routing will never work. Best to avoid using these popular subnets:
    • 192.168.0.x
    • 192.168.1.x
    • 172.16.0.x
    • 172.16.1.x
    • 172.32.0.x
    • 172.32.1.x
    • 10.0.0.x
    • 10.0.1.x
    • 10.1.0.x
    • 10.1.1.x
    • 10.10.10.x

    That still leaves hundreds of thousands of other private subnets from which to choose. I usually choose a subnet that is unusual, but also easy to type.
    If you don't understand this VPN stuff, that's fine. Ignore it.

  3. #3
    Join Date
    Jan 2024
    Beans
    4

    Re: No access to internet / nslookup fails

    Oh
    Now I noticed that my screenshot of my configuration isn't included in my post!? (although this was displayed after CTRL+V).

    Thanks TheFu for your long response!
    It's the desktop version and is only in a home network.
    1) My DHCP server 192.168.2.1 (router) only assigns IP addresses from 192.168.2.150
    2) It's a shame that the screenshot wasn't uploaded, then of course you would have seen my setting.
    3) same as 2)
    4) Here you have given me the right thought.
    When I set the "Obtain DNS automatically" setting, I assumed that Ubuntu also does this like Windows. It probably doesn't. For whatever reason. Unfortunately, I didn't notice it right away. Unfortunately, ifconfig doesn't show the DNS-IP address obtained, but I have it Command
    Code:
    nmcli dev list iface eth0 | grep IP4
    found on the Internet. After I assigned this manually it works now. However, I still wonder why the automatic doesn't work.


    Update: works also in automatic mode! But why ist doesn't work yesterday?? I'm nothing chaged since there. Perhaps the reason was the reboot. But if a button "apply" exits, then I assume the settings are applyed immeditelly....
    Attached Images Attached Images
    Last edited by michl16; January 20th, 2024 at 05:22 PM.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: No access to internet / nslookup fails

    Please don't post large images 'in-line'. An attachment is preferred. Some people pay for internet by the byte. Some people have limits on how much they can download. Every little bit helps.

    That image says you wanted manual control over the network settings. If you run any server, this is smart. By server, I mean any other system wants to connect to this box in any way. Having a static IP on the LAN is a good idea.

    When I set the "Obtain DNS automatically" setting, I assumed that Ubuntu also does this like Windows. It probably doesn't. For whatever reason. Unfortunately, I didn't notice it right away. Unfortunately, ifconfig doesn't show the DNS-IP address obtained, but I have it Command
    Obtain DNS automatically = Use DHCP. This is the same on every OS that I know, which is a bunch.
    ifconfig has been deprecated/unsupported since 2011. Use the 'ip' command instead. The default you probably want is ip addr

    network-manager has some problems for a small group of people, but for most people it works fine.
    For DNS setups, there's another tool, systemd-resolved that handles it. More people have issues with that. I had so many issues that it was just easier to remove it and manually setup the /etc/resolv.conf file, which is where system-level DNS settings go regardless of what other tools are loaded. The issue with modifying that file directly is that there are 2 or 3 other sub-systems that want to control it, so if we don't disable/purge those, our settings will be removed.

    Aber wenn alles funktioniert, würde ich mir heute nicht die Mühe machen, etwas zu ändern.
    Hopefully, doodle translate did a good job with that. Mein Deutsch ist muy mal. Too many years without practice.

  5. #5
    Join Date
    Jan 2024
    Beans
    4

    Re: No access to internet / nslookup fails

    Hi Fu

    I actually believed I had gotten the network connection with your help. But I had rejoice too soon! I had devinitively see the google search web page. Out of the blue it stops working again. How can this be!?
    So the “professionals” complain about Windows, but (i think) only those who have never used Windows. So I've never had any problems getting the network to work. What advantages does maximum functionality bring me when preparing thousands of soups? And what use is a UI for beginners if you have to edit countless configurations again? Okay, I'm annoyed. What I wasted time again... Or I'm cursed that it always just doesn't work for me...


    I'm installing Ubuntu to creating an private nextcloud server. When I downloaded it, I probably overlooked the fact that Ubuntu is also available as a server version (I just thought Microsoft separates this for license). Would probably have been the better choice for my project. Could actually start over again. I haven't configured much yet.

    doodle translate works fine! I hope google translator, too

    "Use DHCP" - of course!

    nslookup, ifconfig - you see, I have to make up a lot of time again

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: No access to internet / nslookup fails

    Quote Originally Posted by michl16 View Post
    I actually believed I had gotten the network connection with your help. But I had rejoice too soon! I had devinitively see the google search web page. Out of the blue it stops working again. How can this be!?
    I don't know. I setup all my systems, including desktops using server config files to avoid dumb issues. Network-Manager isn't just a GUI, as you've seen. However, it isn't actually what the OS network subsystem uses. See, for too many historical reasons, Unix systems start with getting things working using CLI tools, not GUIs. Then later, sometimes never, a GUI gets added to provide 20% of the features. So, if you need more than that 20% in functionality that the GUI provides through an overly, then you need to use the CLI version or go directly to how the OS actually does the configuration.

    Further, every few years, some new GUI becomes "popular", so I could waste time following the GUI changes or I can get on with it and ignore both the GUI de jure and the CLI de jure and do it the way that works alway and has for years, if not decades. Of course, sometimes huge changes happen - sometimes for good and sometimes not, so we are forced to move to the new methods.

    Quote Originally Posted by michl16 View Post
    So the “professionals” complain about Windows, but (i think) only those who have never used Windows. So I've never had any problems getting the network to work. What advantages does maximum functionality bring me when preparing thousands of soups? And what use is a UI for beginners if you have to edit countless configurations again? Okay, I'm annoyed. What I wasted time again... Or I'm cursed that it always just doesn't work for me...
    My issues with MS-Windows are long and deep. For decades, I didn't have any choice and had to use MS-Windows. When I finally got to the position of making decisions for the companies where I worked, I'd have enough UNIX experience to know when that was a better solution and when MS-Windows was a better solution. Had 1 boss begging me to find a way to replace WinXP with Linux for 25K laptops. I spent 4 hrs making calls to the software vendors (we had direct lines to the people in charge) and discovered that the costs for them to port all the custom software to Linux was huge and we'd need 10 yrs for ROI payback.

    Quote Originally Posted by michl16 View Post
    I'm installing Ubuntu to creating an private nextcloud server. When I downloaded it, I probably overlooked the fact that Ubuntu is also available as a server version (I just thought Microsoft separates this for license). Would probably have been the better choice for my project. Could actually start over again. I haven't configured much yet.
    Ubuntu Server doesn't have any GUI. Almost no Linux/Unix servers have any GUI tools. Even the login page is just a text page. If you are new to Linux, please do yourself a favor and DON'T install any "Server" distro until you have a year of daily use of a desktop first. The learning curve is extremely steep.

    While the desktop and server versions of Ubuntu use the exact same kernel, some of the supporting packages for basic things aren't included or integrated into the server. There's no point-n-click at all. No network-manager. No bluetooth. No GUI, so no mouse, no audio, and while you can add them, they won't be integrated as you'd expect.
    It is possible to install any desktop package on any server install
    or
    it is possible to install any server package on any desktop install.
    Servers are tuned a little different, but for a home setup, it won't matter.
    Desktop GUIs bring bloat and unwanted attack vectors. By default, desktop distros enable all sorts of things that aren't needed/wanted in a server. It takes time and a historical perspective to understand these things. The only way I know to gain that historical perspective is time. For example, ZeroConf (or whatever Apple calls it) is implemented in Avahi on Linux. Avahi is a desktop-only thing. It isn't installed on servers for good reason. There are exceptions and it could be installed, but their are ramifications in doing that.

    Unix skills build on prior Unix skills. Jumping in and trying to do advanced things with little background just doesn't turn out well. It takes time and effort to gain the skills and if you learn them in the right order, it will be faster and more efficient. OTOH, everyone wants to overreach and do more intermediate and advanced things. Scratching an itch is very important when choosing projects, but just because MSFT does something 1 way, that doesn't mean every other OS should. There are many things that are similar or appear similar between MS-Windows and all the other popular OSes in the world. You may have noticed this - every popular OS in the world, except MS-Windows, is based on Unix. This means that all the learning you do, will pay off on all those platforms forever. Android and Apple's iOS (not Cisco's ISO) are based on Unix.

    https://www.linuxcommand.org/tlcl.php is a good, minimal, command line book / reference. It covers the basics in a way that is very important in the first 250 pgs. Recommended for anyone wanting to run a server. It isn't hard-core administration stuff, just basic stuff for how the OS works. Free download. No hassle to get it. Quality book, enough that it is actually published in many languages too.

    Quote Originally Posted by michl16 View Post
    doodle translate works fine! I hope google translator, too
    I don't like to use the "g" word.

    Quote Originally Posted by michl16 View Post
    "Use DHCP" - of course!
    Yep.

  7. #7
    Join Date
    Jan 2024
    Beans
    4

    Re: No access to internet / nslookup fails

    Hi Fu
    I think, I'm now on the right way and found the reason for my problem!
    Because I noticed that NAT is working, I google especially for the bridge mode and found following:

    Warning: Network bridging will not work when the physical network device (e.g., eth1, ath0) used for bridging is a wireless device (e.g., ipw3945), as most wireless device drivers do not support bridging!
    https://help.ubuntu.com/community/KVM/Networking
    Also documented here: https://forums.virtualbox.org/viewto...=96608#p468775

    That was new for me, because all my windows guests works in this mode. So I assumed, that this should work in Ubuntu, too. Okay, that was a wrong conclusion.



    Thank you anyway for your help and kind manner!

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: No access to internet / nslookup fails

    This is the first time you mentioned wifi at all! Don't use wifi with virtual machine hosts. There are lots and lots of problems that are easily avoided by using only wired networking.

    The virtualbox manual, chapter 6 is pretty good, I recall. Definitely worth a full read.

Tags for this Thread

Bookmarks

Posting Permissions

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