Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 1 | FAQ |
| 2 | === |
| 3 | |
| 4 | How to change default paths? |
| 5 | ---------------------------- |
| 6 | |
| 7 | Paths to where NFD is installed can be configured during ``./waf |
| 8 | configure``: |
| 9 | |
| 10 | - Installation prefix (default ``/usr/local``): |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | ./waf configure --prefix=/usr |
| 15 | |
| 16 | - Location of NFD configuration file (default: ``${prefix}/etc``): |
| 17 | |
| 18 | :: |
| 19 | |
| 20 | ./waf configure --prefix=/usr --sysconfdir=/etc |
| 21 | |
| 22 | - Location of manpages (default: ``${prefix}/share/man``) |
| 23 | |
| 24 | :: |
| 25 | |
| 26 | ./waf configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man |
| 27 | |
| 28 | How to run NFD on Raspberry Pi? |
| 29 | ------------------------------- |
| 30 | |
| 31 | To run NFD on the Raspberry Pi, you need to either enable IPv6 support |
| 32 | in Raspberry Pi or disable IPv6 support in NFD. |
| 33 | |
| 34 | To enable IPv6 in Raspberry Pi: |
| 35 | |
| 36 | :: |
| 37 | |
| 38 | sudo modprobe ipv6 |
| 39 | |
| 40 | To disable IPv6 in NFD, replace ``enable_v6 yes`` with ``enable_v6 no`` |
| 41 | in ``tcp`` and ``udp`` sections of ``/usr/local/etc/ndn/nfd.conf``: |
| 42 | |
| 43 | :: |
| 44 | |
| 45 | ... |
| 46 | tcp |
| 47 | { |
| 48 | listen yes |
| 49 | port 6363 |
| 50 | enable_v4 yes |
| 51 | enable_v6 no |
| 52 | } |
| 53 | |
| 54 | udp |
| 55 | { |
| 56 | port 6363 |
| 57 | enable_v4 yes |
| 58 | enable_v6 no |
| 59 | idle_timeout 600 |
| 60 | keep_alive_interval 25 |
| 61 | |
| 62 | mcast yes |
| 63 | mcast_port 56363 |
| 64 | mcast_group 224.0.23.170 |
| 65 | } |
| 66 | ... |
| 67 | |
| 68 | |
| 69 | How to run NFD as non-root user? |
| 70 | -------------------------------- |
| 71 | |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 72 | How to configure automatic dropping of privileges? |
| 73 | ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 74 | |
| 75 | NFD can be configured to drop privileges whenever possible. You can specify a user and/or |
| 76 | group for NFD to change its *effective* user/group ID to in the ``general`` section of the |
| 77 | configuration file. For example: |
| 78 | |
| 79 | :: |
| 80 | |
| 81 | general |
| 82 | { |
| 83 | user nobody |
| 84 | group nogroup |
| 85 | } |
| 86 | |
| 87 | will configure NFD to drop its effective user and group IDs to ``nobody`` and ``nogroup``, |
| 88 | respectively. |
| 89 | |
| 90 | .. note:: |
| 91 | |
| 92 | **IMPORTANT:** NFD may regain elevated permissions as needed during normal |
| 93 | execution. Dropping privileges in this manner should not be considered a security |
| 94 | mechanism (a compromised NFD that was started as root can trivially return to |
| 95 | root). However, reducing privileges may limit any damaged caused by well intentioned, |
| 96 | but buggy, code. |
| 97 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 98 | |
| 99 | How to enable Ethernet Face Support? |
| 100 | ++++++++++++++++++++++++++++++++++++ |
| 101 | |
| 102 | The ``ether`` configuration file section contains settings for Ethernet faces and |
| 103 | channels. These settings will **NOT** work without root or setting the appropriate |
| 104 | permissions: |
| 105 | |
| 106 | :: |
| 107 | |
| 108 | sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd |
| 109 | |
| 110 | You may need to install a package to use setcap: |
| 111 | |
| 112 | **Ubuntu:** |
| 113 | |
| 114 | :: |
| 115 | |
| 116 | sudo apt-get install libcap2-bin |
| 117 | |
| 118 | **Mac OS X:** |
| 119 | |
| 120 | :: |
| 121 | |
| 122 | curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz |
| 123 | tar zxvf ChmodBPF.tar.gz |
| 124 | open ChmodBPF/Install\ ChmodBPF.app |
| 125 | |
| 126 | or manually: |
| 127 | |
| 128 | :: |
| 129 | |
| 130 | sudo chgrp admin /dev/bpf* |
| 131 | sudo chmod g+rw /dev/bpf* |
| 132 | |
| 133 | How to enable UDP multicast support in multi-homed Linux machines |
| 134 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 135 | |
| 136 | The UDP configuration file section contains settings for unicast and multicast UDP |
| 137 | faces. If the Linux box is equipped with multiple network interfaces with multicast |
| 138 | capabilities, the settings for multicast faces will **NOT** work without root |
| 139 | or setting the appropriate permissions: |
| 140 | |
| 141 | :: |
| 142 | |
| 143 | sudo setcap cap_net_raw=eip /full/path/nfd |
| 144 | |
| 145 | .. _How to configure NFD security: |
| 146 | |
| 147 | How to configure NFD security? |
| 148 | ------------------------------ |
| 149 | |
| 150 | .. note:: Sample configuration file of NFD allow any user to manage faces, FIB, RIB, and |
| 151 | StrategyChoice. The following description can be used to restrict certain operations |
| 152 | to certain users. |
| 153 | |
| 154 | More extensive documentation about NFD's security and options to configure trust model |
| 155 | for NFD is currently in preparation. |
| 156 | |
| 157 | Many NFD management protocols require signed commands to be processed |
| 158 | (e.g. FIB modification, Face creation/destructions, etc.). You will need |
| 159 | an NDN certificate to use any application that issues signed commands. |
| 160 | |
| 161 | If you do not already have NDN certificate, you can generate one with |
| 162 | the following commands: |
| 163 | |
| 164 | **Generate and install a self-signed identity certificate**: |
| 165 | |
| 166 | :: |
| 167 | |
| 168 | ndnsec-keygen /`whoami` | ndnsec-install-cert - |
| 169 | |
| 170 | Note that the argument to ndnsec-key will be the identity name of the |
| 171 | new key (in this case, ``/your-username``). Identity names are |
| 172 | hierarchical NDN names and may have multiple components (e.g. |
| 173 | ``/ndn/ucla/edu/alice``). You may create additional keys and identities |
| 174 | as you see fit. |
| 175 | |
| 176 | **Dump the NDN certificate to a file**: |
| 177 | |
| 178 | The following commands assume that you have not modified ``PREFIX`` or |
| 179 | ``SYSCONFDIR`` If you have, please substitute ``/usr/local/etc`` for the |
| 180 | appropriate value (the overriden ``SYSCONFDIR`` or ``PREFIX/etc`` if you |
| 181 | changed ``PREFIX``). |
| 182 | |
| 183 | :: |
| 184 | |
| 185 | sudo mkdir -p /usr/local/etc/ndn/keys |
| 186 | ndnsec-cert-dump -i /`whoami` > default.ndncert |
| 187 | sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert |
| 188 | |
| 189 | .. _How to start using NDN MacPorts repository on OSX: |
| 190 | |
| 191 | How to start using NDN MacPorts repository on OSX? |
| 192 | -------------------------------------------------- |
| 193 | |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame^] | 194 | Please see :ref:`Install NFD Using the NDN MacPorts Repository on OS X`. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 195 | |
| 196 | .. _How to start using NDN PPA repository on Ubuntu Linux: |
| 197 | |
| 198 | How to start using NDN PPA repository on Ubuntu Linux? |
| 199 | ------------------------------------------------------ |
| 200 | |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame^] | 201 | Please see :ref:`Install NFD Using the NDN PPA Repository on Ubuntu Linux`. |
Alexander Afanasyev | 84e2977 | 2014-07-02 15:24:31 -0700 | [diff] [blame] | 202 | |
| 203 | .. _How to start using NDN Overlay on Gentoo Linux: |
| 204 | |
| 205 | How to start using NDN Overlay on Gentoo Linux? |
| 206 | ----------------------------------------------- |
| 207 | |
| 208 | If you want to install NFD and other packages using Portage on Gentoo Linux, you can start |
| 209 | using NDN Overlay. |
| 210 | |
| 211 | Simply checkout `NDN Overlay <https://github.com/Pesa/ndn-overlay>`_ repository to some |
| 212 | location add the checkout path to ``PORTDIR_OVERLAY`` in ``/etc/portage/make.conf``: |
| 213 | |
| 214 | :: |
| 215 | |
| 216 | cd /some/path |
| 217 | git clone https://github.com/Pesa/ndn-overlay.git |
| 218 | |
| 219 | # and then add /some/path/ndn-overlay to PORTDIR_OVERLAY in /etc/portage/make.conf |
| 220 | |
| 221 | Afterwards, you will be able to install ``nfd`` using standard mechanisms. |