A userspace application that filters DHCP floods to protect a DHCP server. It uses the Netfilter userspace packet queuing API.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Makefile 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ############################################################################
  2. # Copyright 2019 Pascal Gloor
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################
  16. .PHONY: all clean install uninstall
  17. help:
  18. @echo "make <all|clean|install|uninstall>"
  19. all:
  20. $(MAKE) -C src all
  21. clean:
  22. $(MAKE) -C src clean
  23. install:
  24. systemctl stop dhcp_protect || true
  25. cp src/dhcp_protect /usr/local/bin/
  26. cp etc/dhcp_protect.conf /usr/local/etc/
  27. cp etc/dhcp_protect.service /etc/systemd/system/
  28. chmod 644 /etc/systemd/system/dhcp_protect.service
  29. systemctl enable dhcp_protect
  30. systemctl start dhcp_protect
  31. uninstall:
  32. systemctl stop dhcp_protect || true
  33. systemctl disable dhcp_protect || true
  34. rm -f /usr/local/bin/dhcp_protect
  35. rm -f /usr/local/etc/dhcp_protect.conf
  36. rm -f /etc/systemd/system/dhcp_protect.service