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

    [solved] pfSense Firewall as a Gateway in DHCP not working

    DHCP and DNS
    3
    4
    2.9k
    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.
    • J
      janyabanci
      last edited by

      Hey Everybody,

      I have a problem with setting up the following network:

      • Server: A DHCP Server run with dnsmasq with address 192.168.0.254

      • Clients: A number of clients, leasing addresses from Server

      • Gateway: A Computer with pfSense, WAN and LAN (LAN address 192.168.0.253)

      The _Gateway_s LAN gets its IP Address from Server, so do Clients.
      Up to now, Server was also the gateway to the Internet. This is now changing
      and the default (and only) gateway should be Gateway. So I added

      dhcp-option=3,192.168.0.253

      to dnsmasq. When I now check on any given Client for the route, I get

      default via 192.168.0.253 dev enp2s0f0

      which is and should be the new route to the pfSense Gateway. However, my clients are not
      able to connect to the interweb. Gateway however is. I checked it on the machine
      and, before LAN of Gateway was leasing the IP, it acted as a DHCP Server and clients
      had Internet connection.

      Do you have any idea what step I might have missed out on?

      1 Reply Last reply Reply Quote 0
      • SammyWooS
        SammyWoo
        last edited by

        @janyabanci:

        The _Gateway_s LAN gets its IP Address from Server

        Don't do this.

        All infrastructure equipment (FW, routers, switches, blah-blah) should have static IP, according to my own best practice.

        U can't configure a DHCP server to use a dynamically-assigned IP as gateway.

        Give your FW LAN an static. Inform your DHCP server of the change. Ur done.

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

          "The Gateways LAN gets its IP Address from Server"

          Your saying pfsense is getting its IP from your dhcp server?  Yeah that is not good idea at all..

          Set pfsense lan as static… Does that fix your problem?  Since it prob doesn't get a gateway now, since once pfsense sees a gateway on an interface it thinks its a wan interface, 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.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • J
            janyabanci
            last edited by

            Ah yes, this was indeed the problem.
            Thank you very much for your help!

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