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

    DHCP public LAN doesn't work on linux OS (gateway 0.0.0.0) only on windows

    Scheduled Pinned Locked Moved General pfSense Questions
    17 Posts 4 Posters 3.6k 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.
    • R
      r3xxx4r
      last edited by

      Hi guys,

      I hope you can help me with this problem.
      I have a pfSense server, with WAN fixed public IP (86.x25.xx0.52, a LAN with public IPs (86.x22.xx7.48/28) and OPT1 with local IPs (192.168.10.1/24).
      OPT1 have DHCP enabled and is working fine on all OSes.
      LAN have 8 station (with windows OS) on static IPs and they are working fine, one Raspberry Pi (RASPBIAN Debian Wheezy) on DHCP and it have no ping in pfSense server or in internet, and one Ubuntu web server with static IP and it have no ping in pfSense server or in internet.
      I tried to connect both linux machines on OPT1 and they are working fine, but I need public IPs for them and therefore they should be on LAN. The problem is that they have 0.0.0.0 for gateway on both DHCP Static Mappings and also if I manually set the static ip.
      I hope that you understand my problem and give me hint for a solution.

      1 Reply Last reply Reply Quote 0
      • V
        vindenesen
        last edited by

        At the moment I can't give you a hint, but we'll start with gathering some more information :)

        On your Raspbian Pi, run the command "route" (without the quotes)
        And post the output. Should be something similar like this:

        
        me@rasp02 ~ $ route
        Kernel IP routing table
        Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
        default         172.30.1.14     0.0.0.0         UG    0      0        0 eth0
        172.30.1.0      *               255.255.255.224 U     0      0        0 eth0
        
        

        In addition, run the commands "ifconfig" and "cat /etc/network/interfaces", (still on the Raspbian) and post the output.

        You mentioned that you are using DHCP server for the OPT1 interface. Are you using DHCP server on the LAN interface (with DHCP static mappings) also? Could you take a screenshot of your DHCP server settings on the LAN interface?

        Edit: The subject answered my question about dhcp on LAN.

        Support the project by buying a Gold Subscription at https://portal.pfsense.org
        Running pfSense on SuperMicro A1SRI-2758F with ESXi 5.5

        1 Reply Last reply Reply Quote 0
        • R
          r3xxx4r
          last edited by

          I hope this screenshots are good

          ![IMG_20140731_211239 jpg.jpg](/public/imported_attachments/1/IMG_20140731_211239 jpg.jpg)
          ![IMG_20140731_211239 jpg.jpg_thumb](/public/imported_attachments/1/IMG_20140731_211239 jpg.jpg_thumb)
          ![macumba office - Services- DHCP server.jpg](/public/imported_attachments/1/macumba office - Services- DHCP server.jpg)
          ![macumba office - Services- DHCP server.jpg_thumb](/public/imported_attachments/1/macumba office - Services- DHCP server.jpg_thumb)
          ![macumba office - Status- DHCP leases (1).jpg](/public/imported_attachments/1/macumba office - Status- DHCP leases (1).jpg)
          ![macumba office - Status- DHCP leases (1).jpg_thumb](/public/imported_attachments/1/macumba office - Status- DHCP leases (1).jpg_thumb)

          1 Reply Last reply Reply Quote 0
          • V
            vindenesen
            last edited by

            Looks like your gateway address that you have entered in on the DHCP settings for LAN is incorrect. You have entered the network address instead of the firewall IP address. Somehow Windows is able to interpret this, not sure why. Fix that, and try to renew the IP address on the Linux-based clients, and see how it goes :)

            Support the project by buying a Gold Subscription at https://portal.pfsense.org
            Running pfSense on SuperMicro A1SRI-2758F with ESXi 5.5

            1 Reply Last reply Reply Quote 0
            • R
              r3xxx4r
              last edited by

              Even if i leave the field blank and Use the command netstat -nr it gives me the same result

              ![IMG_20140731_221648 jpg.jpg](/public/imported_attachments/1/IMG_20140731_221648 jpg.jpg)
              ![IMG_20140731_221648 jpg.jpg_thumb](/public/imported_attachments/1/IMG_20140731_221648 jpg.jpg_thumb)
              ![macumba office - Services- DHCP server (1).jpg](/public/imported_attachments/1/macumba office - Services- DHCP server (1).jpg)
              ![macumba office - Services- DHCP server (1).jpg_thumb](/public/imported_attachments/1/macumba office - Services- DHCP server (1).jpg_thumb)

              1 Reply Last reply Reply Quote 0
              • V
                vindenesen
                last edited by

                What commands did you use to renew the IP address on rpimacumba? Or did you reboot it?

                Support the project by buying a Gold Subscription at https://portal.pfsense.org
                Running pfSense on SuperMicro A1SRI-2758F with ESXi 5.5

                1 Reply Last reply Reply Quote 0
                • R
                  r3xxx4r
                  last edited by

                  I've rebooted the Raspberry Pi and also try with sudo dhclient eth0
                  I can't put another IP in gateway field.

                  Even if i configure eth0 with
                  iface eth0 inet static
                  address 86.122.117.49
                  netmask 255.255.255.240
                  network 86.122.117.48
                  broadcast 86.122.117.63
                  gateway 86.122.117.48
                  it doesn't work

                  1 Reply Last reply Reply Quote 0
                  • V
                    vindenesen
                    last edited by

                    Take a screenshot of your LAN settings, and post here.

                    Edit: And again, with your netmask, you cannot use 86.122.117.48 as an host/gateway address, as it is the network address. See:
                    http://jodies.de/ipcalc?host=86.122.117.48&mask1=28&mask2=

                    The first IP address you can use is .49, the last is .62.

                    Support the project by buying a Gold Subscription at https://portal.pfsense.org
                    Running pfSense on SuperMicro A1SRI-2758F with ESXi 5.5

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

                      ^ exactly if this 86.122.117.48/28 network is routed to your wan IP..  What IP did you put on the pfsense lan interface for this network.

                      You would normally take the first host address in that network for pfsense lan interface so .49 - you could then use hosts .50 to 62 where clients on this network would use the pfsense lan IP .49 as their gateway.

                      I would also expect that if you have a routed network your connection that would have disabled nat for this segment in pfsense.  Or you going to end up natting these Ips to whatever the IP is on your wan interface.

                      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
                      • R
                        r3xxx4r
                        last edited by

                        This are my LAN settings

                        ![macumba office - Interfaces- LAN.jpg](/public/imported_attachments/1/macumba office - Interfaces- LAN.jpg)
                        ![macumba office - Interfaces- LAN.jpg_thumb](/public/imported_attachments/1/macumba office - Interfaces- LAN.jpg_thumb)

                        1 Reply Last reply Reply Quote 0
                        • V
                          vindenesen
                          last edited by

                          With your netmask, that's an IP address you cannot use. You can only use the addresses ending in the range from 49 towards 62. Most people would use the first usable IP address as the gateway address, in this case 86.122.117.49. This means that the IP addresses that can be used on clients is 50, 51, 52 … 62.

                          I guess Windows is not so picky about the IP address, but Linux-based operating system certainly are, and that's why you don't get a default gateway on your Raspberry Pi (and the other Linux-based OS) because the address that the DHCP server sends is invalid.

                          I guess that pfSense should have notified you that the address specified on the interface is invalid, but looks like it doesn't.

                          Support the project by buying a Gold Subscription at https://portal.pfsense.org
                          Running pfSense on SuperMicro A1SRI-2758F with ESXi 5.5

                          1 Reply Last reply Reply Quote 0
                          • R
                            r3xxx4r
                            last edited by

                            I tried to create an interface LAN Gateway with 86.122.117.49, but that doesn't work either and also it doesn't work on windows with DHCP). the only clients that work are  windows PC with fixed IPs from 86.122.117.50 to xx.xxx.xxx.58 with gateway 86.122.117.48

                            1 Reply Last reply Reply Quote 0
                            • V
                              vindenesen
                              last edited by

                              Did you remove or edit the DHCP static mapping in the DHCP server settings for LAN? And you are sure of that another device on the network isn't using 86.122.117.49 already?

                              What netmask did you enter on your Windows machines when you added a static IP address?

                              Support the project by buying a Gold Subscription at https://portal.pfsense.org
                              Running pfSense on SuperMicro A1SRI-2758F with ESXi 5.5

                              1 Reply Last reply Reply Quote 0
                              • R
                                r3xxx4r
                                last edited by

                                I'm positive about 86.122.117.49 isn't use by another device. I remove the static mapping because it was only for the linux server. My windows pc clients have IPs from 50 to 58 with gateway ip 86.122.117.48

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

                                  Here is the thing dude .48/28 is NOT a  valid IP - its NOT!!!  That is the network ADDRESS, not the first useable host..

                                  Change your IP on pfsense lan to .49/28

                                  Now you shouldn't have to but your having issues - so once you change it reboot pfsense.  Now on a client set its IP to .50 with /28 mask.. Can you ping .49?  If not what is in your arp table for .49?

                                  What version of pfsense are you using - as you can see from the attached pfsense will not even allow you to set that IP - because its a NETWORK not a valid host IP.

                                  invailidpfsense.png
                                  invailidpfsense.png_thumb

                                  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
                                  • R
                                    ronald2981
                                    last edited by

                                    It Looks like your gateway address that you have entered in on the DHCP settings for LAN is incorrect.

                                    1 Reply Last reply Reply Quote 0
                                    • R
                                      r3xxx4r
                                      last edited by

                                      thank you guys, you are the best. it's working now thank to your knowledge.

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