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

Start/stop DHCP-server via shell

Scheduled Pinned Locked Moved DHCP and DNS
4 Posts 2 Posters 15.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.
  • P
    PreLo
    last edited by Dec 9, 2006, 10:18 PM

    Hello,

    I am unable to manually start/stop the DHCP-server via shell command.
    Could somebody please point me into the right direction?

    Many thanks in advance!

    1 Reply Last reply Reply Quote 0
    • P
      PreLo
      last edited by Dec 14, 2006, 2:18 PM

      ok ok - your neglect tells me to be more elaborate. :-)

      There really is some sense behind that question.

      At first I simply wanted to start and stop the DHCP-Server via script, but as I have added another NIC to my pfsense it would be way better if I could change the configuration of the dhcpd to stop listening on one interface. That way, I can keep using DHCP on one interface and turn it off on the other.

      The following basic steps are what I have in mind for the script:
      1.DHCP-config A is loaded, DHCP is running.
      2. Script stops DHCP-server, checks for configuration.
      3. Script detects config A, changes to config B
      4. Script restarts DHCP-server.
      The script would then run as a cronjob.

      I am not sure if this can be done - any help really is appreciated.
      The thing is, that I have been unable to find out how pfsense starts and stops the DHCP-Server although I have tried and researched quite a bit and even asked some friends that are way more unix-skilled than I am.

      Many thanks in advance.

      1 Reply Last reply Reply Quote 0
      • J
        jeroen234
        last edited by Dec 14, 2006, 6:27 PM

        this is wat pfsense use to start the dhcpd server:
        /usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /var/dhcpd/etc/dhcpd.conf vr0

        1 Reply Last reply Reply Quote 0
        • P
          PreLo
          last edited by Dec 14, 2006, 7:28 PM

          That sounds very useful indeed. I appreciate your quick response. Thank you!

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received