blob: 2be26bfedb871d2a44d26590b14dbae1d0e3ca4e [file] [log] [blame]
Alexander Afanasyev26181532014-05-07 23:38:51 -07001FAQ
2===
3
Davide Pesavento69857c32020-04-05 16:36:26 -04004How do I change the default installation paths?
5-----------------------------------------------
Alexander Afanasyev26181532014-05-07 23:38:51 -07006
Davide Pesavento69857c32020-04-05 16:36:26 -04007Paths to where NFD is installed can be configured during ``./waf configure``:
Alexander Afanasyev26181532014-05-07 23:38:51 -07008
Davide Pesavento69857c32020-04-05 16:36:26 -04009- Installation prefix (default ``/usr/local``)::
Alexander Afanasyev26181532014-05-07 23:38:51 -070010
Davide Pesavento69857c32020-04-05 16:36:26 -040011 ./waf configure --prefix=/usr
Alexander Afanasyev26181532014-05-07 23:38:51 -070012
Davide Pesavento69857c32020-04-05 16:36:26 -040013- Location of NFD configuration file (default: ``${prefix}/etc``)::
Alexander Afanasyev26181532014-05-07 23:38:51 -070014
Davide Pesavento69857c32020-04-05 16:36:26 -040015 ./waf configure --prefix=/usr --sysconfdir=/etc
Alexander Afanasyev26181532014-05-07 23:38:51 -070016
Davide Pesavento69857c32020-04-05 16:36:26 -040017- Location of manpages (default: ``${prefix}/share/man``)::
Alexander Afanasyev26181532014-05-07 23:38:51 -070018
Davide Pesavento69857c32020-04-05 16:36:26 -040019 ./waf configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
Alexander Afanasyev26181532014-05-07 23:38:51 -070020
Davide Pesavento69857c32020-04-05 16:36:26 -040021See ``./waf configure --help`` for the full list of options.
Alexander Afanasyev26181532014-05-07 23:38:51 -070022
Davide Pesavento69857c32020-04-05 16:36:26 -040023How do I use the NDN PPA repository on Ubuntu Linux?
24----------------------------------------------------
Alexander Afanasyev26181532014-05-07 23:38:51 -070025
Davide Pesavento69857c32020-04-05 16:36:26 -040026Please see :ref:`Install NFD on Ubuntu Linux using the NDN PPA repository`.
Alexander Afanasyev26181532014-05-07 23:38:51 -070027
Davide Pesavento69857c32020-04-05 16:36:26 -040028How do I run NFD as a non-root user?
29------------------------------------
Alexander Afanasyev26181532014-05-07 23:38:51 -070030
Davide Pesavento69857c32020-04-05 16:36:26 -040031How do I configure automatic privilege dropping?
32++++++++++++++++++++++++++++++++++++++++++++++++
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060033
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
Davide Pesavento69857c32020-04-05 16:36:26 -040036configuration file. For example::
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060037
38 general
39 {
40 user nobody
41 group nogroup
42 }
43
44will configure NFD to drop its effective user and group IDs to ``nobody`` and ``nogroup``,
45respectively.
46
47.. note::
48
Davide Pesavento70156942018-09-15 18:40:21 -040049 **IMPORTANT:** NFD may regain elevated privileges as needed during normal
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060050 execution. Dropping privileges in this manner should not be considered a security
51 mechanism (a compromised NFD that was started as root can trivially return to
Davide Pesavento70156942018-09-15 18:40:21 -040052 root). However, reducing privileges may limit any damage caused by well intentioned,
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060053 but buggy, code.
54
Davide Pesavento69857c32020-04-05 16:36:26 -040055How do I enable Ethernet face support?
56++++++++++++++++++++++++++++++++++++++
Alexander Afanasyev26181532014-05-07 23:38:51 -070057
58The ``ether`` configuration file section contains settings for Ethernet faces and
Davide Pesavento69857c32020-04-05 16:36:26 -040059channels. These settings will **NOT** work without root or without setting the
60appropriate permissions.
Alexander Afanasyev26181532014-05-07 23:38:51 -070061
62**Ubuntu:**
63
64::
65
Davide Pesavento69857c32020-04-05 16:36:26 -040066 sudo apt install libcap2-bin
67 sudo setcap cap_net_raw,cap_net_admin=eip /path/to/nfd
Alexander Afanasyev26181532014-05-07 23:38:51 -070068
Davide Pesavento69857c32020-04-05 16:36:26 -040069**macOS:**
Alexander Afanasyev26181532014-05-07 23:38:51 -070070
71::
72
73 curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
74 tar zxvf ChmodBPF.tar.gz
75 open ChmodBPF/Install\ ChmodBPF.app
76
Davide Pesavento69857c32020-04-05 16:36:26 -040077or manually::
Alexander Afanasyev26181532014-05-07 23:38:51 -070078
79 sudo chgrp admin /dev/bpf*
80 sudo chmod g+rw /dev/bpf*
81
Davide Pesavento69857c32020-04-05 16:36:26 -040082How do I enable UDP multicast support in multi-homed Linux machines?
83++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alexander Afanasyev26181532014-05-07 23:38:51 -070084
Davide Pesavento69857c32020-04-05 16:36:26 -040085The ``udp`` configuration file section contains settings for unicast and multicast UDP
86faces. If the Linux machine is equipped with multiple network interfaces with multicast
87capabilities, the settings for multicast faces will **NOT** work without root or without
88setting the appropriate permissions::
Alexander Afanasyev26181532014-05-07 23:38:51 -070089
Davide Pesavento69857c32020-04-05 16:36:26 -040090 sudo setcap cap_net_raw=eip /path/to/nfd
Alexander Afanasyev26181532014-05-07 23:38:51 -070091
Davide Pesavento69857c32020-04-05 16:36:26 -040092.. _How do I configure NFD security:
Alexander Afanasyev26181532014-05-07 23:38:51 -070093
Davide Pesavento69857c32020-04-05 16:36:26 -040094How do I configure NFD security?
95--------------------------------
Alexander Afanasyev26181532014-05-07 23:38:51 -070096
Davide Pesavento69857c32020-04-05 16:36:26 -040097.. note:: The sample configuration file for NFD allows any user to manage faces, FIB, RIB,
98 CS, and strategy choices of the local NFD instance. The following procedure can be used
99 to restrict certain operations to certain users.
Alexander Afanasyev26181532014-05-07 23:38:51 -0700100
Davide Pesavento69857c32020-04-05 16:36:26 -0400101 More extensive documentation on the security mechanisms in NFD, as well as the available
102 options to configure its trust model, is currently in preparation.
Alexander Afanasyev26181532014-05-07 23:38:51 -0700103
Davide Pesavento69857c32020-04-05 16:36:26 -0400104Many management components in NFD use *Command Interests* (e.g., FIB modification, face
105creation/destruction, etc.), which require an NDN certificate (either self-signed for local
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400106trust or delegated from a trusted authority).
Alexander Afanasyev26181532014-05-07 23:38:51 -0700107
Davide Pesavento69857c32020-04-05 16:36:26 -0400108If you do not already have an NDN certificate, you can generate one using the following procedure.
Alexander Afanasyev26181532014-05-07 23:38:51 -0700109
Davide Pesavento69857c32020-04-05 16:36:26 -0400110**Generating and installing a self-signed identity certificate**:
Alexander Afanasyev26181532014-05-07 23:38:51 -0700111
112::
113
114 ndnsec-keygen /`whoami` | ndnsec-install-cert -
115
Alexander Afanasyev84dd4ca2017-10-15 14:56:08 -0400116Note that the argument to ndnsec-key will be the identity name of the new key (in this case,
117``/your-username``). Identity names are hierarchical NDN names and may have multiple components
118(e.g. ``/ndn/ucla/edu/alice``). You may create additional keys and identities as you see fit.
Alexander Afanasyev26181532014-05-07 23:38:51 -0700119
Davide Pesavento69857c32020-04-05 16:36:26 -0400120**Exporting the NDN certificate to a file**:
Alexander Afanasyev26181532014-05-07 23:38:51 -0700121
Davide Pesavento69857c32020-04-05 16:36:26 -0400122The following commands assume that you have not modified ``PREFIX`` or ``SYSCONFDIR``.
123If you have, please substitute the appropriate path in place of ``/usr/local/etc``.
Alexander Afanasyev26181532014-05-07 23:38:51 -0700124
125::
126
127 sudo mkdir -p /usr/local/etc/ndn/keys
128 ndnsec-cert-dump -i /`whoami` > default.ndncert
129 sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert