• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.
  • B
    bmeeks
    last edited by bmeeks Jul 12, 2020, 1:21 AM Jul 12, 2020, 1:19 AM

    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 Jul 12, 2020, 12:05 PM

      @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 ?

      J 1 Reply Last reply Jul 12, 2020, 12:30 PM Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator @Farisse
        last edited by Jul 12, 2020, 12:30 PM

        @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 Jul 12, 2020, 12:46 PM Reply Quote 0
        • F
          Farisse @johnpoz
          last edited by Jul 12, 2020, 12:46 PM

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

          1 Reply Last reply Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by johnpoz Jul 12, 2020, 12:49 PM Jul 12, 2020, 12:47 PM

            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 Jul 12, 2020, 1:02 PM Reply Quote 0
            • F
              Farisse @johnpoz
              last edited by Jul 12, 2020, 1:02 PM

              @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
              • J
                johnpoz LAYER 8 Global Moderator
                last edited by johnpoz Jul 12, 2020, 1:09 PM Jul 12, 2020, 1:05 PM

                Yes lets see the output of the commands.. Not just you saying something doesn't work via what a browser? ping pfsense dmz address, if you can't then your never getting anywhere.. If you can not query dns then your never going to get anywhere via fqdn.

                Lets see say a traceroute when it works, and when it doesn't work to both an IP say 8.8.8.8 and then say via a fqdn like www.google.com

                Your not doing something like static arps are you in pfsense?

                If you setup a static arp say for 1.2.3.4 mac xyz so that what the client gets when dhcp is on, and then you setup IP on the machine to be 1.2.3.5 then no it wouldn't work.

                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 Jul 12, 2020, 1:17 PM Reply Quote 0
                • F
                  Farisse @johnpoz
                  last edited by Farisse Jul 12, 2020, 1:30 PM Jul 12, 2020, 1:17 PM

                  @johnpoz
                  the video is uploading i'll add screenshots in a few minutes
                  https://streamable.com/j30bzs

                  Ping from Windows Hyper-v to DMZ network 455fbd6a-2e49-4aca-9c16-51e06309c41e-image.png

                  Ping from Ubuntu to DNS/DMZ network + ifconfig
                  41793422-93b4-41ea-b546-d88f9cc70877-image.png

                  Do you need more info ?

                  1 Reply Last reply Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator
                    last edited by Jul 12, 2020, 2:05 PM

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

                    1 Reply Last reply Reply Quote 0
                    • F
                      Farisse
                      last edited by Farisse Jul 12, 2020, 2:17 PM Jul 12, 2020, 2:17 PM

                      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
                      • J
                        johnpoz LAYER 8 Global Moderator
                        last edited by johnpoz Jul 12, 2020, 3:53 PM Jul 12, 2020, 3:45 PM

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

                        F 1 Reply Last reply Jul 12, 2020, 4:02 PM Reply Quote 0
                        • F
                          Farisse @johnpoz
                          last edited by Jul 12, 2020, 4:02 PM

                          @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
                          • J
                            johnpoz LAYER 8 Global Moderator
                            last edited by Jul 12, 2020, 5:16 PM

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

                            1 Reply Last reply Reply Quote 1
                            • F
                              Farisse
                              last edited by Jul 12, 2020, 5:37 PM

                              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 ?

                              J 1 Reply Last reply Jul 12, 2020, 6:07 PM Reply Quote 0
                              • J
                                johnpoz LAYER 8 Global Moderator
                                last edited by Jul 12, 2020, 6:06 PM

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

                                1 Reply Last reply Reply Quote 1
                                • J
                                  johnpoz LAYER 8 Global Moderator @Farisse
                                  last edited by johnpoz Jul 12, 2020, 6:08 PM Jul 12, 2020, 6:07 PM

                                  @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.7.2, 24.11

                                  F 1 Reply Last reply Jul 12, 2020, 7:51 PM Reply Quote 0
                                  • F
                                    Farisse
                                    last edited by Jul 12, 2020, 7:49 PM

                                    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 Jul 12, 2020, 7:51 PM

                                      @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
                                      • J
                                        johnpoz LAYER 8 Global Moderator
                                        last edited by johnpoz Jul 12, 2020, 8:16 PM Jul 12, 2020, 8:09 PM

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

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Farisse
                                          last edited by Farisse Jul 12, 2020, 8:33 PM Jul 12, 2020, 8:32 PM

                                          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
                                          42 out of 49
                                          • First post
                                            42/49
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received