Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [RESOLVED]No internet on ubuntu when disable dhcp

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    49 Posts 4 Posters 8.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Farisse @kiokoman
      last edited by

      @kiokoman tbh i dont understand ubuntu anymore, i didn't use it for years now. otherwise i was using debian Jessie ... and i never had so many problems with ubuntu or debian. Since they changed that thing of netplan and resolveconf etc. i became lost in the configuration of networks :/
      To respond to wht you said, when the dhcp is activated and i try to get ip details i see the this gateway this is why i add it to the network configuration. but event without it wont work >.< i literally tried every possibility but it didn't work.

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by kiokoman

        yeah i have ubuntu but the first thing i have done was to uninstall / disable netplan and restore the old behavior like debian
        i'm still using /etc/network/interface to set my static ip and resolvconf

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        F 1 Reply Last reply Reply Quote 1
        • F
          Farisse @kiokoman
          last edited by

          @kiokoman Idk if i still can do it, because i'm bored of trying things that doesn't work like "usual" before.
          idk if this can help to visualise my problem :
          https://streamable.com/397ueq

          1 Reply Last reply Reply Quote 0
          • kiokomanK
            kiokoman LAYER 8
            last edited by

            that is a ubuntu problem for sure, idk you should ask ubuntu forum or https://askubuntu.com/questions/1031709/ubuntu-18-04-switch-back-to-etc-network-interfaces
            or use dhcp static mapping

            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
            Please do not use chat/PM to ask for help
            we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
            Don't forget to Upvote with the 👍 button for any post you find to be helpful.

            F 1 Reply Last reply Reply Quote 1
            • F
              Farisse @kiokoman
              last edited by

              @kiokoman Thank you i will take a look at the post :)

              1 Reply Last reply Reply Quote 0
              • F
                Farisse
                last edited by

                Update !

                So i reinstalled my ubuntu machine and deactivated netplan and ... It didn't work.

                The simple reason is, i am working on a private network they have their own DNS servers.

                So when i am using the DHCP server there is apparently an automatic DNS forwarding to my machine. The DNS of my school but its hidden in the ubuntu settings. (ofc)

                So now when i tried to put the dns of my school in my /etc/systemd/resolved.conf document. It worked.

                Now i'm wondering if you may help me to understand how i could make it work without adding the dns of my school in the /resolved.conf ?

                I thought about dns forwarding, but not sure about the working.

                If someone can help it would be great. If not, moderator can close the subject and mark it as solved.

                Thank you for your help ! :)

                Farisse

                bmeeksB 1 Reply Last reply Reply Quote 0
                • bmeeksB
                  bmeeks @Farisse
                  last edited by bmeeks

                  @Farisse said in No internet on ubuntu when disable dhcp:

                  Update !

                  So i reinstalled my ubuntu machine and deactivated netplan and ... It didn't work.

                  The simple reason is, i am working on a private network they have their own DNS servers.

                  So when i am using the DHCP server there is apparently an automatic DNS forwarding to my machine. The DNS of my school but its hidden in the ubuntu settings. (ofc)

                  So now when i tried to put the dns of my school in my /etc/systemd/resolved.conf document. It worked.

                  Now i'm wondering if you may help me to understand how i could make it work without adding the dns of my school in the /resolved.conf ?

                  I thought about dns forwarding, but not sure about the working.

                  If someone can help it would be great. If not, moderator can close the subject and mark it as solved.

                  Thank you for your help ! :)

                  Farisse

                  It is a fairly common practice for schools to intercept DNS requests and redirect/force them to a school-maintained DNS server. The school's DHCP server is giving all machines on the network the proper DNS server to use. This is done to monitor for and/or prevent access to inappropriate content. It also allows the school to have DNS entries they maintain for local servers and services. If your school network is doing this, then you won't be able to use another DNS server unless you perhaps can get something running over a VPN.

                  F 1 Reply Last reply Reply Quote 1
                  • F
                    Farisse @bmeeks
                    last edited by

                    @bmeeks
                    Thank you for your answer
                    Indeed, i have to use the dns of the school. But what i don't understand is, i don't put anything on my windows machine except the static ip, gateway that's all and it works. But on my ubuntu machine it doesn't work. So i don't understand how it works in pfsense to let my windows machine use the dns i entered in pfsense and not my ubuntu machine. It's not logic for me :/

                    bmeeksB 1 Reply Last reply Reply Quote 0
                    • bmeeksB
                      bmeeks @Farisse
                      last edited by

                      @Farisse said in No internet on ubuntu when disable dhcp:

                      @bmeeks
                      Thank you for your answer
                      Indeed, i have to use the dns of the school. But what i don't understand is, i don't put anything on my windows machine except the static ip, gateway that's all and it works. But on my ubuntu machine it doesn't work. So i don't understand how it works in pfsense to let my windows machine use the dns i entered in pfsense and not my ubuntu machine. It's not logic for me :/

                      Is your Windows machine a member of an AD domain? If so, the AD domain controller is the DNS server, and it probably forwards to the school's DNS server (or it may actually be the school's DNS server).

                      F 1 Reply Last reply Reply Quote 0
                      • F
                        Farisse @bmeeks
                        last edited by

                        @bmeeks Nope its not :(
                        I just tried but my windows machine is not member of AD domain.
                        here is a little video : https://streamable.com/6mznjo
                        even with the schools dns it doesn't work anymore. Really strange things are happening here :/

                        bmeeksB 1 Reply Last reply Reply Quote 0
                        • bmeeksB
                          bmeeks @Farisse
                          last edited by

                          @Farisse said in No internet on ubuntu when disable dhcp:

                          @bmeeks Nope its not :(
                          I just tried but my windows machine is not member of AD domain.
                          here is a little video : https://streamable.com/6mznjo
                          even with the schools dns it doesn't work anymore. Really strange things are happening here :/

                          I am not a user of Hyper-V. I am an ESXi user. One place I would concentrate my research is within the networking configuration of Hyper-V.

                          Are you running Hyper-V on hardware by itself, or are you running Hyper-V on say a Windows desktop? There will be substantial changes to some of the networking in one installation versus the other.

                          F 1 Reply Last reply Reply Quote 0
                          • F
                            Farisse @bmeeks
                            last edited by

                            @bmeeks
                            I don't think the problem should come from the hyper v configuration. I think this because all the other machines are working, and its only ubuntu machines that doesn't work. (Maybe i should go to an ubuntu forum sorry for that). I work on a windows desktop.
                            So i have a VPN connection to the windows machine where is installed windows server and hyper-v manager.
                            I think the problem should be something like resolving he dns between the ubuntu machine and pfsense but idk where to search :/

                            1 Reply Last reply Reply Quote 0
                            • F
                              Farisse
                              last edited by

                              After a lot of research i'm asking myself if someone could maybe tell me where i could find any information about the changes that are made when the dhcp server is enabled.

                              I searched in the pfsense book, but it is not written how it works. If i find what changes are made i would be able to find where the problem is with my server.

                              Thank you guys !

                              1 Reply Last reply Reply Quote 0
                              • johnpozJ
                                johnpoz LAYER 8 Global Moderator
                                last edited by

                                And again - The dhcp server being on or off has ZERO to do with whatever issue your having.

                                The only changes that happen that you might not see when you enable a dhcp server on a specific interface, is some hidden rules get added to allow for dhcp to reach the server running on pfsense..

                                An intelligent man is sometimes forced to be drunk to spend time with his fools
                                If you get confused: Listen to the Music Play
                                Please don't Chat/PM me for help, unless mod related
                                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                F 1 Reply Last reply Reply Quote 0
                                • bmeeksB
                                  bmeeks
                                  last edited by bmeeks

                                  Okay, going back and reading your original post one more time, this is what I am hearing you say:

                                  When you turn on or enable the DHCP server in pfSense and you enable DHCP in your Ubuntu machine, you have Internet access. But when you turn off the DHCP server in pfSense and try a static IP with no DHCP configured in Ubuntu, you have no Internet access.

                                  If the above is correct, then this is what I think is happening. You are never actually disabling the DHCP client on the Ubuntu machine even though you might think you are. So when you turn off the DHCP server in pfSense, the DHCP client on Ubuntu can't get a proper IP address and thus you have no connectivity. With the DHCP server running on pfSense, the Ubuntu DHCP client can get the info it needs and the Internet works on the Ubuntu machine.

                                  That's what I believe is happening. You think you are turning off DHCP on the Ubuntu machine and switching to a static IP, but I'm thinking perhaps you are not actually doing that. I know that it can be a real pain to re-plumb the network in modern Linux distros with their fancy GUIs. They really, really want to use the DHCP client.

                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    Farisse @johnpoz
                                    last edited by

                                    @johnpoz You are right, but where could i find these rules ? My firewall rules are empty (or everything is open). There is something i am missing in this configuration. It makes me sick of not understanding why sometimes it works and sometimes not with the same configuration.

                                    @bmeeks i actually don't even know when it's working or not. I had a few minutes ago an internet connection on my machine and, a few minutes later nothing anymore.

                                    How could i get more details about this ? Logs ?

                                    johnpozJ 1 Reply Last reply Reply Quote 0
                                    • johnpozJ
                                      johnpoz LAYER 8 Global Moderator @Farisse
                                      last edited by

                                      @Farisse said in No internet on ubuntu when disable dhcp:

                                      My firewall rules are empty (or everything is open)

                                      If your firewall rules are EMPTY then everything is blocked!

                                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                                      If you get confused: Listen to the Music Play
                                      Please don't Chat/PM me for help, unless mod related
                                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                      F 1 Reply Last reply Reply Quote 0
                                      • F
                                        Farisse @johnpoz
                                        last edited by

                                        @johnpoz No sorry I mean everything is open 74ea0f9a-a7ef-4ac7-bcc2-c1b7bf11f7ec-image.png

                                        1 Reply Last reply Reply Quote 0
                                        • johnpozJ
                                          johnpoz LAYER 8 Global Moderator
                                          last edited by johnpoz

                                          And clearly you have 13 states currently open using that rule, and have moved 63.18 MB of traffic.

                                          How about some actual info... Lets see you ping the DMZ address from this client.. Lets see you do a dns query to what the dmz address, some other dns server?

                                          Lets see the ifconfig output from this client. When you say it doesn't work, and then when you say it works if you turn on dhcp on pfsense.

                                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                                          If you get confused: Listen to the Music Play
                                          Please don't Chat/PM me for help, unless mod related
                                          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                          F 1 Reply Last reply Reply Quote 0
                                          • F
                                            Farisse @johnpoz
                                            last edited by

                                            @johnpoz said in No internet on ubuntu when disable dhcp:

                                            How about some actual info... Lets see you ping the DMZ address from this client.. Lets see you do a dns query to what the dmz address, some other dns server?
                                            Lets see the ifconfig output from this client. When you say it doesn't work, and then when you say it works if you turn on dhcp on pfsense.

                                            i am not sure about understanding the questions do you mean that i show the results of the commands you said ?

                                            There are 2 dns servers. One one the schools network and the other in my lan network.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.