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.

107 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2018 rosysong@rosinson.com
  3. #
  4. # This is the sample for nft-qos configuration file,
  5. # which will generate a nftables script in /tmp/qos.nft
  6. #
  7. # Getting Started
  8. # Official site :
  9. # https://netfilter.org/projects/nftables/index.html
  10. # What is nftables :
  11. # https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
  12. #
  13. # Basic Operations
  14. # Configuring Tables :
  15. # https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
  16. # Configuring Chains :
  17. # https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains
  18. # Configuring Rules :
  19. # https://wiki.nftables.org/wiki-nftables/index.php/Simple_rule_management
  20. # Quick Reference (recommended) :
  21. # https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes
  22. # https://netfilter.org/projects/nftables/manpage.html
  23. #
  24. config default default
  25. # Enable Flag for limit rate
  26. option limit_enable '1'
  27. # Options for enable Static QoS (rate limit)
  28. option limit_type 'static'
  29. # Options for Static QoS (rate limit)
  30. option static_unit_dl 'kbytes'
  31. option static_unit_ul 'kbytes'
  32. option static_rate_dl '50'
  33. option static_rate_ul '50'
  34. # Options for enable Dynamic QoS
  35. # This option can not compatible with Static QoS
  36. # option limit_type 'dynamic'
  37. # For Dynamic QoS Samples (unit of bandwidth is Mbps):
  38. option dynamic_cidr '192.168.1.0/24'
  39. option dynamic_cidr6 'AAAA:BBBB::1/64'
  40. option dynamic_bw_up '100'
  41. option dynamic_bw_down '100'
  42. # White list for static/dynamic limit
  43. # list limit_whitelist '192.168.1.225'
  44. # list limit_whitelist '192.168.1.0/24'
  45. # list limit_whitelist 'ABCD:CDEF::1/64'
  46. # Options for Traffic Priority
  47. option priority_enable '0'
  48. option priority_netdev 'lan'
  49. #
  50. # For Static QoS Rate Limit Samples :
  51. #
  52. # For Download :
  53. #config download
  54. # option hostname 'My PC'
  55. # option unit 'kbytes'
  56. # option ipaddr '192.168.1.224'
  57. # option rate '128'
  58. #
  59. # For Upload :
  60. #config upload
  61. # option hostname 'office-pc'
  62. # option unit 'mbytes'
  63. # option ipaddr 'ABCD:FFED::1/64'
  64. # option rate '1024'
  65. #
  66. #
  67. # Traffic Priority Samples :
  68. #
  69. # protocol : tcp, udp, udplite, sctp, dccp, tcp is default
  70. # priority : integer between 1-11, 1 is default and the highest
  71. # service : you can input a integer or service name,
  72. # e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
  73. #
  74. #config priority
  75. # option protocol 'tcp'
  76. # option priority '-400'
  77. # option service '23'
  78. # option comment '?'
  79. #
  80. #config priority
  81. # option protocol 'udp'
  82. # option priority '-400'
  83. # option service 'https'
  84. # option comment '?'
  85. #
  86. #config priority
  87. # option protocol 'dccp'
  88. # option priority '0'
  89. # option service '22-35'
  90. # option comment '?'
  91. #
  92. #config priority
  93. # option protocol 'dccp'
  94. # option priority '300'
  95. # option service 'ftp,ssh,http'
  96. # option comment '?'
  97. #