Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 1 | FAQ |
| 2 | === |
| 3 | |
Davide Pesavento | 7015694 | 2018-09-15 18:40:21 -0400 | [diff] [blame] | 4 | How to change the default paths? |
| 5 | -------------------------------- |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 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 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 28 | How to run NFD as non-root user? |
| 29 | -------------------------------- |
| 30 | |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 31 | How to configure automatic dropping of privileges? |
| 32 | ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 33 | |
| 34 | NFD can be configured to drop privileges whenever possible. You can specify a user and/or |
| 35 | group for NFD to change its *effective* user/group ID to in the ``general`` section of the |
| 36 | configuration file. For example: |
| 37 | |
| 38 | :: |
| 39 | |
| 40 | general |
| 41 | { |
| 42 | user nobody |
| 43 | group nogroup |
| 44 | } |
| 45 | |
| 46 | will configure NFD to drop its effective user and group IDs to ``nobody`` and ``nogroup``, |
| 47 | respectively. |
| 48 | |
| 49 | .. note:: |
| 50 | |
Davide Pesavento | 7015694 | 2018-09-15 18:40:21 -0400 | [diff] [blame] | 51 | **IMPORTANT:** NFD may regain elevated privileges as needed during normal |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 52 | execution. Dropping privileges in this manner should not be considered a security |
| 53 | mechanism (a compromised NFD that was started as root can trivially return to |
Davide Pesavento | 7015694 | 2018-09-15 18:40:21 -0400 | [diff] [blame] | 54 | root). However, reducing privileges may limit any damage caused by well intentioned, |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 55 | but buggy, code. |
| 56 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 57 | How to enable Ethernet Face Support? |
| 58 | ++++++++++++++++++++++++++++++++++++ |
| 59 | |
| 60 | The ``ether`` configuration file section contains settings for Ethernet faces and |
| 61 | channels. These settings will **NOT** work without root or setting the appropriate |
| 62 | permissions: |
| 63 | |
| 64 | :: |
| 65 | |
| 66 | sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd |
| 67 | |
| 68 | You may need to install a package to use setcap: |
| 69 | |
| 70 | **Ubuntu:** |
| 71 | |
| 72 | :: |
| 73 | |
| 74 | sudo apt-get install libcap2-bin |
| 75 | |
| 76 | **Mac OS X:** |
| 77 | |
| 78 | :: |
| 79 | |
| 80 | curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz |
| 81 | tar zxvf ChmodBPF.tar.gz |
| 82 | open ChmodBPF/Install\ ChmodBPF.app |
| 83 | |
| 84 | or manually: |
| 85 | |
| 86 | :: |
| 87 | |
| 88 | sudo chgrp admin /dev/bpf* |
| 89 | sudo chmod g+rw /dev/bpf* |
| 90 | |
| 91 | How to enable UDP multicast support in multi-homed Linux machines |
| 92 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 93 | |
| 94 | The UDP configuration file section contains settings for unicast and multicast UDP |
| 95 | faces. If the Linux box is equipped with multiple network interfaces with multicast |
| 96 | capabilities, the settings for multicast faces will **NOT** work without root |
| 97 | or setting the appropriate permissions: |
| 98 | |
| 99 | :: |
| 100 | |
| 101 | sudo setcap cap_net_raw=eip /full/path/nfd |
| 102 | |
| 103 | .. _How to configure NFD security: |
| 104 | |
| 105 | How to configure NFD security? |
| 106 | ------------------------------ |
| 107 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 108 | .. note:: The sample configuration file of NFD allow any user to manage faces, FIB, RIB, and |
| 109 | StrategyChoice of the local NFD. The following description can be used to restrict certain |
| 110 | operations to certain users. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 111 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 112 | More extensive documentation about NFD's security and options to configure trust model for |
| 113 | NFD is currently in preparation. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 114 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 115 | Many NFD management protocols use commands Interests (e.g., FIB modification, Face |
| 116 | creation/destructions, etc.), which require an NDN certificate (either self-signed for local |
| 117 | trust or delegated from a trusted authority). |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 118 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 119 | If you do not already have NDN certificate, you can generate one with the following commands: |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 120 | |
| 121 | **Generate and install a self-signed identity certificate**: |
| 122 | |
| 123 | :: |
| 124 | |
| 125 | ndnsec-keygen /`whoami` | ndnsec-install-cert - |
| 126 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 127 | Note that the argument to ndnsec-key will be the identity name of the new key (in this case, |
| 128 | ``/your-username``). Identity names are hierarchical NDN names and may have multiple components |
| 129 | (e.g. ``/ndn/ucla/edu/alice``). You may create additional keys and identities as you see fit. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 130 | |
| 131 | **Dump the NDN certificate to a file**: |
| 132 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 133 | The following commands assume that you have not modified ``PREFIX`` or ``SYSCONFDIR`` If you |
| 134 | have, please substitute ``/usr/local/etc`` for the appropriate value (the overriden |
| 135 | ``SYSCONFDIR`` or ``PREFIX/etc`` if you changed ``PREFIX``). |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 136 | |
| 137 | :: |
| 138 | |
| 139 | sudo mkdir -p /usr/local/etc/ndn/keys |
| 140 | ndnsec-cert-dump -i /`whoami` > default.ndncert |
| 141 | sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert |
| 142 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 143 | .. _How to start using NDN PPA repository on Ubuntu Linux: |
| 144 | |
| 145 | How to start using NDN PPA repository on Ubuntu Linux? |
| 146 | ------------------------------------------------------ |
| 147 | |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 148 | Please see :ref:`Install NFD Using the NDN PPA Repository on Ubuntu Linux`. |