Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 1 | ; The general section contains settings of nfd process. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 2 | ; general |
| 3 | ; { |
| 4 | ; } |
| 5 | |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 6 | log |
| 7 | { |
| 8 | ; default_level specifies the logging level for modules |
| 9 | ; that are not explicitly named. All debugging levels |
| 10 | ; listed above the selected value are enabled. |
| 11 | ; |
| 12 | ; Valid values: |
| 13 | ; |
| 14 | ; NONE ; no messages |
| 15 | ; ERROR ; error messages |
| 16 | ; WARN ; warning messages |
| 17 | ; INFO ; informational messages (default) |
| 18 | ; DEBUG ; debugging messages |
| 19 | ; TRACE ; trace messages (most verbose) |
| 20 | ; ALL ; all messages |
| 21 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 22 | default_level INFO |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 23 | |
| 24 | ; You may override default_level by assigning a logging level |
| 25 | ; to the desired module name. Module names can be found in two ways: |
| 26 | ; |
| 27 | ; Run: |
| 28 | ; nfd --modules |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 29 | ; nrd --modules |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 30 | ; |
| 31 | ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files |
| 32 | ; |
| 33 | ; Example module-level settings: |
| 34 | ; |
| 35 | ; FibManager DEBUG |
| 36 | ; Forwarder INFO |
| 37 | } |
| 38 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 39 | ; The face_system section defines what faces and channels are created. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 40 | face_system |
| 41 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 42 | ; The unix section contains settings of UNIX stream faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 43 | unix |
| 44 | { |
| 45 | listen yes ; set to 'no' to disable UNIX stream listener, default 'yes' |
| 46 | path /var/run/nfd.sock ; UNIX stream listener path |
| 47 | } |
| 48 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 49 | ; The tcp section contains settings of TCP faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 50 | tcp |
| 51 | { |
| 52 | listen yes ; set to 'no' to disable TCP listener, default 'yes' |
| 53 | port 6363 ; TCP listener port number |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 54 | enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes' |
| 55 | enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes' |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 56 | } |
| 57 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 58 | ; The udp section contains settings of UDP faces and channels. |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 59 | ; UDP channel is always listening; delete udp section to disable UDP |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 60 | udp |
| 61 | { |
| 62 | port 6363 ; UDP unicast port number |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 63 | enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes' |
| 64 | enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes' |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 65 | idle_timeout 600 ; idle time (seconds) before closing a UDP unicast face |
| 66 | keep_alive_interval 25; interval (seconds) between keep-alive refreshes |
| 67 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 68 | ; UDP multicast settings |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 69 | ; NFD creates one UDP multicast face per NIC |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 70 | ; |
| 71 | ; In multi-homed Linux machines these settings will NOT work without |
| 72 | ; root or settings the appropriate permissions: |
| 73 | ; |
| 74 | ; sudo setcap cap_net_raw=eip /full/path/nfd |
| 75 | ; |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 76 | mcast yes ; set to 'no' to disable UDP multicast, default 'yes' |
| 77 | mcast_port 56363 ; UDP multicast port number |
| 78 | mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only) |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 79 | } |
| 80 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 81 | ; The ether section contains settings of Ethernet faces and channels. |
| 82 | ; These settings will NOT work without root or setting the appropriate |
| 83 | ; permissions: |
| 84 | ; |
| 85 | ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd |
| 86 | ; |
| 87 | ; You may need to install a package to use setcap: |
| 88 | ; |
| 89 | ; **Ubuntu:** |
| 90 | ; |
| 91 | ; sudo apt-get install libcap2-bin |
| 92 | ; |
| 93 | ; **Mac OS X:** |
| 94 | ; |
| 95 | ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz |
| 96 | ; tar zxvf ChmodBPF.tar.gz |
| 97 | ; open ChmodBPF/Install\ ChmodBPF.app |
| 98 | ; |
| 99 | ; or manually: |
| 100 | ; |
| 101 | ; sudo chgrp admin /dev/bpf* |
| 102 | ; sudo chmod g+rw /dev/bpf* |
| 103 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 104 | @IF_HAVE_LIBPCAP@ether |
| 105 | @IF_HAVE_LIBPCAP@{ |
| 106 | @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings |
| 107 | @IF_HAVE_LIBPCAP@ ; NFD creates one Ethernet multicast face per NIC |
| 108 | @IF_HAVE_LIBPCAP@ |
| 109 | @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes' |
| 110 | @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group |
| 111 | @IF_HAVE_LIBPCAP@} |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 112 | } |
| 113 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 114 | ; The authorizations section grants privileges to authorized keys. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 115 | authorizations |
| 116 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 117 | ; An authorize section grants privileges to a NDN certificate. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 118 | authorize |
| 119 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 120 | ; If you do not already have NDN certificate, you can generate |
| 121 | ; one with the following commands. |
| 122 | ; |
| 123 | ; 1. Generate and install a self-signed identity certificate: |
| 124 | ; |
| 125 | ; ndnsec-keygen /`whoami` | ndnsec-install-cert - |
| 126 | ; |
| 127 | ; Note that the argument to ndnsec-key will be the identity name of the |
| 128 | ; new key (in this case, /your-username). Identities are hierarchical NDN |
| 129 | ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`). |
| 130 | ; You may create additional keys and identities as you see fit. |
| 131 | ; |
| 132 | ; 2. Dump the NDN certificate to a file: |
| 133 | ; |
| 134 | ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/ |
| 135 | ; ndnsec-cert-dump -i /`whoami` > default.ndncert |
| 136 | ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert |
| 137 | ; |
| 138 | ; The "certfile" field below specifies the default key directory for |
| 139 | ; your machine. You may move your newly created key to the location it |
| 140 | ; specifies or path. |
| 141 | |
| 142 | certfile keys/default.ndncert ; NDN identity certificate file |
| 143 | privileges ; set of privileges granted to this identity |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 144 | { |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 145 | faces |
| 146 | fib |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 147 | strategy-choice |
| 148 | } |
| 149 | } |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 150 | |
| 151 | ; You may have multiple authorize sections that specify additional |
| 152 | ; certificates and their privileges. |
| 153 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 154 | ; authorize |
| 155 | ; { |
| 156 | ; certfile keys/this_cert_does_not_exist.ndncert |
| 157 | ; authorize |
| 158 | ; privileges |
| 159 | ; { |
| 160 | ; faces |
| 161 | ; } |
| 162 | ; } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 163 | } |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 164 | |
| 165 | rib_security |
| 166 | { |
| 167 | ; This section defines the trust model for NFD RIB Management. It consists of rules and |
| 168 | ; trust-anchors, which are briefly defined in this file. For more information refer to |
| 169 | ; manpage of ndn-validator.conf: |
| 170 | ; |
| 171 | ; man ndn-validator.conf |
| 172 | ; |
| 173 | ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the |
| 174 | ; root of certification chain (e.g., NDN testbed root certificate) or an existing |
| 175 | ; default system certificate `default.ndncert`. |
| 176 | ; |
| 177 | ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the |
| 178 | ; rules defined here. A rule can be broken into two parts: matching & checking. A packet |
| 179 | ; will be matched against rules from the first to the last until a matched rule is |
| 180 | ; encountered. The matched rule will be used to check the packet. If a packet does not |
| 181 | ; match any rule, it will be treated as invalid. The matching part of a rule consists |
| 182 | ; of `for` and `filter` sections. They collectively define which packets can be checked |
| 183 | ; with this rule. `for` defines packet type (data or interest) and `filter` defines |
| 184 | ; conditions on other properties of a packet. Right now, you can only define conditions |
| 185 | ; on packet name, and you can only specify ONLY ONE filter for packet name. The |
| 186 | ; checking part of a rule consists of `checker`, which defines the conditions that a |
| 187 | ; VALID packet MUST have. See comments in checker section for more details. |
| 188 | |
| 189 | rule |
| 190 | { |
| 191 | id "NRD Prefix Registration Command Rule" |
| 192 | for interest ; rule for Interests (to validate CommandInterests) |
| 193 | filter |
| 194 | { |
| 195 | type name ; condition on interest name (w/o signature) |
| 196 | regex ^[<localhop><localhost>]<nrd>[<register><unregister>]<>{3}$ |
| 197 | } |
| 198 | checker |
| 199 | { |
| 200 | type customized |
| 201 | sig-type rsa-sha256 ; interest must have a rsa-sha256 signature |
| 202 | key-locator |
| 203 | { |
| 204 | type name ; key locator must be the certificate name of |
| 205 | ; the signing key |
| 206 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$ |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | rule |
| 211 | { |
| 212 | id "NDN Testbed Hierarchy Rule" |
| 213 | for data ; rule for Data (to validate NDN certificates) |
| 214 | filter |
| 215 | { |
| 216 | type name ; condition on data name |
| 217 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$ |
| 218 | } |
| 219 | checker |
| 220 | { |
| 221 | type hierarchical ; the certificate name of the signing key and |
| 222 | ; the data name must follow the hierarchical model |
| 223 | sig-type rsa-sha256 ; data must have a rsa-sha256 signature |
| 224 | } |
| 225 | } |
| 226 | trust-anchor |
| 227 | { |
| 228 | type file |
| 229 | file-name keys/default.ndncert ; the file name, by default this file should be placed in the |
| 230 | ; same folder as this config file. |
| 231 | } |
| 232 | ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors |
| 233 | ; { |
| 234 | ; type file |
| 235 | ; file-name keys/ndn-testbed.ndncert |
| 236 | ; } |
| 237 | } |