Fork of FusionPBX but with LDAP kinda working
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

  1. #!/bin/sh
  2. #move to script directory so all relative paths work
  3. cd "$(dirname "$0")"
  4. #add the includes
  5. . ./config.sh
  6. . ./colors.sh
  7. . ./environment.sh
  8. #send a message
  9. verbose "Configuring nftables"
  10. #run iptables commands
  11. nft add rule ip filter INPUT iifname "lo" counter accept
  12. nft add rule ip filter INPUT ct state related,established counter accept
  13. nft add rule ip filter INPUT tcp dport 22 counter accept
  14. nft add rule ip filter INPUT tcp dport 80 counter accept
  15. nft add rule ip filter INPUT tcp dport 443 counter accept
  16. nft add rule ip filter INPUT tcp dport 7443 counter accept
  17. nft add rule ip filter INPUT tcp dport 5060-5091 counter accept
  18. nft add rule ip filter INPUT udp dport 5060-5091 counter accept
  19. nft add rule ip filter INPUT udp dport 16384-32768 counter accept
  20. nft add rule ip filter INPUT icmp type echo-request counter accept
  21. nft add rule ip filter INPUT udp dport 1194 counter accept
  22. nft add rule ip mangle OUTPUT udp sport 16384-32768 counter ip dscp set 0x2e
  23. nft add rule ip mangle OUTPUT tcp sport 5060-5091 counter ip dscp set 0x1a
  24. nft add rule ip mangle OUTPUT udp sport 5060-5091 counter ip dscp set 0x1a