blob: 842a45b6a5a4f3a0111ff24144ac4d42143b48f6 [file] [log] [blame]
Alexander Afanasyev26181532014-05-07 23:38:51 -07001FAQ
2===
3
Davide Pesavento70156942018-09-15 18:40:21 -04004How to change the default paths?
5--------------------------------
Alexander Afanasyev26181532014-05-07 23:38:51 -07006
7Paths to where NFD is installed can be configured during ``./waf
8configure``:
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 Afanasyev26181532014-05-07 23:38:51 -070028How to run NFD as non-root user?
29--------------------------------
30
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060031How to configure automatic dropping of privileges?
32++++++++++++++++++++++++++++++++++++++++++++++++++
33
34NFD can be configured to drop privileges whenever possible. You can specify a user and/or
35group for NFD to change its *effective* user/group ID to in the ``general`` section of the
36configuration file. For example:
37
38::
39
40 general
41 {
42 user nobody
43 group nogroup
44 }
45
46will configure NFD to drop its effective user and group IDs to ``nobody`` and ``nogroup``,
47respectively.
48
49.. note::
50
Davide Pesavento70156942018-09-15 18:40:21 -040051 **IMPORTANT:** NFD may regain elevated privileges as needed during normal
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060052 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 Pesavento70156942018-09-15 18:40:21 -040054 root). However, reducing privileges may limit any damage caused by well intentioned,
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060055 but buggy, code.
56
Alexander Afanasyev26181532014-05-07 23:38:51 -070057How to enable Ethernet Face Support?
58++++++++++++++++++++++++++++++++++++
59
60The ``ether`` configuration file section contains settings for Ethernet faces and
61channels. These settings will **NOT** work without root or setting the appropriate
62permissions:
63
64::
65
66 sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
67
68You 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
84or manually:
85
86::
87
88 sudo chgrp admin /dev/bpf*
89 sudo chmod g+rw /dev/bpf*
90
91How to enable UDP multicast support in multi-homed Linux machines
92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
93
94The UDP configuration file section contains settings for unicast and multicast UDP
95faces. If the Linux box is equipped with multiple network interfaces with multicast
96capabilities, the settings for multicast faces will **NOT** work without root
97or 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
105How to configure NFD security?
106------------------------------
107
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400108.. 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 Afanasyev26181532014-05-07 23:38:51 -0700111
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400112 More extensive documentation about NFD's security and options to configure trust model for
113 NFD is currently in preparation.
Alexander Afanasyev26181532014-05-07 23:38:51 -0700114
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400115Many NFD management protocols use commands Interests (e.g., FIB modification, Face
116creation/destructions, etc.), which require an NDN certificate (either self-signed for local
117trust or delegated from a trusted authority).
Alexander Afanasyev26181532014-05-07 23:38:51 -0700118
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400119If you do not already have NDN certificate, you can generate one with the following commands:
Alexander Afanasyev26181532014-05-07 23:38:51 -0700120
121**Generate and install a self-signed identity certificate**:
122
123::
124
125 ndnsec-keygen /`whoami` | ndnsec-install-cert -
126
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400127Note 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 Afanasyev26181532014-05-07 23:38:51 -0700130
131**Dump the NDN certificate to a file**:
132
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400133The following commands assume that you have not modified ``PREFIX`` or ``SYSCONFDIR`` If you
134have, please substitute ``/usr/local/etc`` for the appropriate value (the overriden
135``SYSCONFDIR`` or ``PREFIX/etc`` if you changed ``PREFIX``).
Alexander Afanasyev26181532014-05-07 23:38:51 -0700136
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 Afanasyev26181532014-05-07 23:38:51 -0700143.. _How to start using NDN PPA repository on Ubuntu Linux:
144
145How to start using NDN PPA repository on Ubuntu Linux?
146------------------------------------------------------
147
Steve DiBenedetto62a93942014-08-24 17:13:52 -0600148Please see :ref:`Install NFD Using the NDN PPA Repository on Ubuntu Linux`.