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 10.1k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by

      And that is with dhcp or static? And where is your dns query?

      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.8, 24.11

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

        This is Static the video is when internet was functional and then after reboot ... nothing anymore

        here is the dns query:
        c3cd78d9-8c96-438e-890e-4835863518f0-image.png

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

          Well not really possible to use the internet without dns resolution..

          What server are you trying to query - can not tell from that command..

          Do a dig with with @ipaddress of dns server.

          something like dig @192.168.1.1 www.google.com

          your command is just going to ask some dns server, which don't know what that is for 192.168.1.1

          Is pfsense listening on dmz interface for dns? Are you pointing dns to something else?

          how about this output

          networkctl status
          ●        State: routable
                 Address: 192.168.2.12 on ens3
                          fe80::11:32ff:fe22:cc7d on ens3
                 Gateway: 192.168.2.253 (ADI Engineering, Inc.) on ens3
                     DNS: 192.168.3.10
          Search Domains: local.lan
                     NTP: 192.168.3.32
                          192.168.2.253
          

          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.8, 24.11

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

            @johnpoz Well i didn't change anything and i have an internet connection again.

            maybe extra information :
            I use an external DNS in pfsense
            25f8f886-96b7-48a5-ad05-9bf473fc797e-image.png

            As from now i have internet this is the requested command :
            2e919bed-ce19-4c6b-a4c7-be3a8079fe0c-image.png

            cdea2864-c329-4214-bd3d-60812506f9b0-image.png

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

              Well from your output of nteworkctl you have NO DNS set..

              Unless you setup forwarding on pfsense, those dns servers don't do anything other what pfsense itself would use for dns.

              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.8, 24.11

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

                The DNS forwarder is indeed enabled in pfsense and dns resolver to. Does it make any change if i configure the dns on a client machine ?

                And why do i get internet for a few time then no more internet and after a few time back again without changing nothing ?

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

                  My "guess" would be when your on dhcp you cache some records..

                  Clearly from what you posted you have no dns set.. So NO internet is never going to work - unless you plan on just using IPs only ;)

                  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.8, 24.11

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

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

                    The DNS forwarder is indeed enabled in pfsense and dns resolver to

                    Well that is just borked! You mean you have unbound fowarding? Running both forward (dnsmasq) and resolver unbound is going to be problematic for sure.. Unless you have 1 running on different port than 53.

                    from your directed query to 192.168.1.1 you resolved google - so set your ubuntu to use that for its dns when you run static.

                    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.8, 24.11

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

                      They are on two different ports
                      92a0187a-0d46-47c6-81eb-425c49f9b715-image.png
                      90899a5d-f29b-4944-bfaa-6c614e19fe02-image.png

                      I should normally not have any problem with that ? Except maybe my other dns server who is in my lan that i use with freeradius on my guest network ?

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

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

                        from your directed query to 192.168.1.1 you resolved google - so set your ubuntu to use that for its dns when you run static.

                        What do you mean with this ? I thought i already configures my ubuntu for using a dns ?
                        c6e5b648-ab3c-49db-9213-05f9dfa9cf4d-image.png
                        286efefb-6daa-4f00-af26-9316acdd2e85-image.png

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

                          Well clearly not using that now is it..

                          When you directed to do dns it work @192.168.1.1

                          When you just do dig, its saying it can not talk to dns.

                          when you look with networkctrl status - does it show you dns.. NO... And its not working, so clearly its NOT SET!! if it was, then it would be using it and working...

                          what does nslookup show you?

                          user@NewUC:~$ nslookup www.google.com
                          Server:         127.0.0.53
                          Address:        127.0.0.53#53
                          
                          Non-authoritative answer:
                          Name:   www.google.com
                          Address: 172.217.4.196
                          Name:   www.google.com
                          Address: 2607:f8b0:4009:806::2004
                          
                          

                          Here
                          https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-18-04/

                          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.8, 24.11

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

                            Yeah you’re right it should work if it was set do not understand why it doesn’t.

                            Btw thank you for the link but I can’t process as it is explained. I removed netplan to use the old network configuration ( using /etc/network/interfaces & the screenshot above for the dns)

                            This is the result of the requested command

                            3243C0C6-218B-442F-B30F-5AB68AB3D35A.png

                            alt text

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

                              So from your nslookup its working, but its pointing to dnsmasq most likely running locally.. Which in turn forwards to whatever dns you want say 192.168.1.1

                              So now it should be working?

                              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.8, 24.11

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

                                Ubuntu is insane haha >.< You set up everything to be used 'externally' and it choose to use local dnsmasq. Whatever ...

                                It is working indeed, i'm just afraid to restart the machine and lose the connection again. i prefered to follow what you said to check everything and if its not working anymore search from where it doesn't work. So i'm going to restart now and hope it will still work.

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

                                  as i thought after a restart of the machine. No connectivity anymore. 😅

                                  ddb286f6-2cf6-48b9-b15b-0cc98222b079-image.png

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

                                    dude if you can not ping 192.168.1.1 then no you can not do anything...

                                    which has ZERO to do with dhcp, and really zero to do with pfsense at all.. You have other devices on this 192.168.1/24 network... I suggest you head on over to ubuntu forums in your native language to get help on how to setup it up with static..

                                    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.8, 24.11

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

                                      Ok, Well thank you for your help. I already tried in my native language on ubuntu forum, but i got no answer. Whatever, i'll search after how to make it work.

                                      Thank you for your explanations, help & time ! 💯

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

                                        Here is 1st thing you have to test when doing any basic networking troubleshooting.

                                        Can you actually talk to your gateway.. Can you talk to other devices on that network?

                                        If you can not, look in your arp table - you can not talk to ip address xyz, if you can not arp for it..

                                        DHCP has zero to do with actually connectivity - other than handing the client an IP, gateway and dns.. If your doing it static dhcp being on or off on the firewall has nothing to do with connectivity.

                                        If you say it works via dhcp, but not when static - then your not setting up the static correctly... The only way dhcp could have anything to do with your problem is if you were setting up static arp on pfsense. With a reservation that mac address xyz gets 1.2.3.4.. And now when not using dhcp you setup 1.2.3.5 so your static arp does not match up.. So you can not talk to pfsense would = broken connectivity.. Simple test of ping and knowing if you setup static arp or not would be key here..

                                        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.8, 24.11

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

                                          Thank you for your help, i never heard about it, i was usually using ping and traceroute command. i am not a specialist. I maybe gave a wrong explanation, but as you said it's not about pfsense son i should ask to ubuntu users. My question was about why it was working when the dhcp on pfsense was enabled and static ip on ubuntu, but not with dhcp was disabled and static ip on ubuntu. For sure it's something about the dns I hoped to find an answer here because i thought i has something to do with the dhcp server but it's not...
                                          I'll try other linux/ubuntu forums or just switch to another operating system.

                                          Many thanks for your help man ! I appreciate it, you made me understand things I understood/learned wrong.
                                          Big up ;-)

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