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.

143 lines
4.8 KiB

  1. package fastd
  2. config fastd sample_config
  3. # Set to 1 to enable this instance:
  4. option enabled 0
  5. # Sets a static config file, optional
  6. # Options set via UCI have higher priority that statically configured ones
  7. # list config '/etc/fastd/sample_config/fastd.conf'
  8. # Configures a single static peer from a configuration file
  9. # list config_peer '/etc/fastd/sample_config/sample_peer.conf'
  10. # Sets an additional directory from which peers configurations are read
  11. # The peer list can be reloaded without restarting fastd
  12. # Peer can either be configured via UCI (see examples below) or via peer dirs
  13. # Can't be used in tun mode
  14. # list config_peer_dir '/etc/fastd/sample_config/peers'
  15. # Sets the log level
  16. # Possible values: error, warn, info, verbose, debug
  17. # Default: info
  18. option syslog_level 'info'
  19. # IP address and port of the local end, optional
  20. # 'any' can be used to bind to both IPv4 and IPv6
  21. # If no port is given fastd will bind to a random port
  22. # list bind 'any:1337'
  23. # list bind '0.0.0.0:1337'
  24. # list bind '[::]:1337'
  25. # "method null" uses no encryption or MAC
  26. # "method xsalsa20-poly1305" uses the XSalsa20 encryption ad the Poly1305 MAC
  27. list method 'xsalsa20-poly1305'
  28. # "mode tap" will create an ethernet tunnel (tap device),
  29. # "mode tun" will create an IP tunnel (tun device).
  30. option mode 'tap'
  31. # Set the name of the tunnel interface to use
  32. option interface 'tap0'
  33. # option interface 'tun0'
  34. # option interface 'fastd0'
  35. # Sets the MTU of the tunnel interface, default is 1500
  36. # 1426 is a good value that avoids fragmentation for the xsalsa20-poly1305 method
  37. # when the tunnel uses an IPv4 connection on a line with an MTU of 1492 or higher
  38. option mtu 1426
  39. # Enables direct forwaring of packets between peers
  40. # WARNING: Only enable this if you know what you are doing, as this can lead to forwarding loops!
  41. option forward 0
  42. # Disable for compatiblity with fastd v10 and older
  43. option secure_handshakes 1
  44. # Set a packet mark to filter for with iptables or ip rules
  45. # option packet_mark 42
  46. # Limits the maximum number of connections, optional
  47. # option peer_limit 5
  48. # The secret key
  49. # A keypair can be generated with `fastd --generate-key`
  50. # When the corresponding public key is lost it can be recovered with `/etc/init.d/fastd show-key <config name>`
  51. # option secret '0000000000000000000000000000000000000000000000000000000000000000'
  52. # Sets the user to run fastd as. Defaults to root
  53. # option user 'daemon'
  54. # Sets the group to run fastd as. Defaults to the user's primary group
  55. # option group 'daemon'
  56. # If set to 1, the logs won't contain peers' IP addresses
  57. # option hide_ip_addresses '0'
  58. # If set to 1, the logs won't contain peers' MAC addresses
  59. # option hide_mac_addresses '0'
  60. # Read the documentation about this one. Only ever useful in severly broken networks.
  61. # option pmtu ''
  62. # command to configure IP addresses etc. after the tunnel interface is up; $1 will be the interface name (optional)
  63. # option up ''
  64. # command to execute before the tunnel interface is set down; $1 will be the interface name (optional)
  65. # option down ''
  66. config peer sample_peer
  67. # Set to 1 to enable this peer
  68. # In tap mode peers can be reloaded dynamically
  69. option enabled 0
  70. # Controls which instance this peer is associated with
  71. option net 'sample_config'
  72. # Controls which peer group this peer belongs to, optional
  73. # For most use cases peer groups aren't necessary
  74. # option group 'sample_group'
  75. # The peer's public key
  76. option key '0000000000000000000000000000000000000000000000000000000000000000'
  77. # A remote specification consists of an address or a hostname, and a port
  78. # When a hostname is given, it is recommended to specify the address family to use
  79. # It is possible to specify no, one or multiple remotes
  80. # (but all entries must designate the same host as the public key must be unique)
  81. # list remote '192.0.2.1:1337'
  82. # list remote '[2001:db8::1]:1337'
  83. # list remote '"example.com" port 1337'
  84. # list remote 'ipv4 "example.com" port 1337'
  85. # list remote 'ipv6 "example.com" port 1337'
  86. # Setting float to 1 allow incoming connections with this key from other addresses/hostnames/ports than the specified remotes
  87. # option float 0
  88. config peer_group sample_group
  89. # Set to 1 to enable this peer group
  90. option enabled 0
  91. # Controls which instance this peer group is associated with
  92. # Peer groups can't be used in tun mode
  93. option net 'sample_config'
  94. # Allows configuring nested groups
  95. # option parent 'other_group'
  96. # Includes another config file inside the peer group definition
  97. # list config '/etc/fastd/sample_config/sample_group.conf'
  98. # Configures a single static peer from a configuration file
  99. # list config_peer '/etc/fastd/sample_config/sample_peer.conf'
  100. # Configures an additional peer directory for this group
  101. # list config_peer_dir '/etc/fastd/sample_config/peers2'
  102. # Limits the maximum number of connections to peers in this group (optional)
  103. # option peer_limit 5