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

    DHCP without issuing Default Gateway?

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 3 Posters 1.8k 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
      brasilnut
      last edited by

      Does anyone know of a way that I can get PFSense to
      *** NOT ***
      issue a Gateway IP Address?

      I have a situation, where Mobile Handsets would be connecting.
      But I only want them to access the LAN.

      They are connecting to a WAP, which is mapped to a specific vLAN
      which DHCP is served by PFSense…

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

        Just hand out 127.0.0.1 or some other IP on that network that is not a valid gateway.

        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
        • B
          brasilnut
          last edited by

          @johnpoz:

          Just hand out 127.0.0.1 or some other IP on that network that is not a valid gateway.

          But then, the Device will not be able to reach the Public Internet,
          because it will then be trying to access the Public Internet VIA the bogus IP Address…

          Is there not a way to disable DHCP from issuing a Gateway IP Address?

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

            Huh?  You stated you want them only reaching LAN

            "But I only want them to access the LAN."

            How are they going to reach the internet with no gateway?

            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
            • B
              brasilnut
              last edited by

              The android clients have 4G built in to them.
              I need them only to utilize WiFi, in order to access the LAN devices…

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

                Ah I see your problem then, if there is a gateway then that would take higher priority than there 4G connection most likely.

                So what you need is the ability to override the default feature

                " The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network. "

                This might be better suited as a request here
                http://devwiki.pfsense.org/RequestedFeatures

                Which points you to here
                https://redmine.pfsense.org/projects/pfsense/issues/new

                Other options would be to run a different dhcp server than pfsense, or possible to directly edit the conf file that would be here

                /var/dhcpd/etc

                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
                • T
                  timthetortoise
                  last edited by

                  Replace /etc/inc/services.inc and /usr/local/www/services_dhcp.php with the following. Not 100% sure that it works properly in practice, but it definitely leaves the routers option out of your DHCP config. To use, type "none" without quotes in the gateway field.

                  services.inc
                  services_dhcp.php

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