RC.CONF(5) | MidnightBSD File Formats Manual | RC.CONF(5) |
rc.conf
— system
configuration information
The file rc.conf
contains descriptive
information about the local host name, configuration details for any
potential network interfaces and which services should be started up at
system initial boot time. In new installations, the
rc.conf
file is generally initialized by the system
installation utility.
The purpose of rc.conf
is not to run
commands or perform system startup actions directly. Instead, it is included
by the various generic startup scripts in /etc which
conditionalize their internal actions according to the settings found
there.
The /etc/rc.conf file is included from the file /etc/defaults/rc.conf, which specifies the default settings for all the available options. Options need only be specified in /etc/rc.conf when the system administrator wishes to override these defaults. The file /etc/rc.conf.local is used to override settings in /etc/rc.conf for historical reasons.
The sysrc(8) command provides a scripting interface to modify system config files.
In addition to /etc/rc.conf.local you can also place smaller configuration files for each rc(8) script in the /etc/rc.conf.d directory or ⟨dir⟩/rc.conf.d directories specified in local_startup, which will be included by the load_rc_config function. For jail configurations you could use the file /etc/rc.conf.d/jail to store jail-specific configuration options. If local_startup contains /usr/local/etc/rc.d and /opt/conf, /usr/local/etc/rc.conf.d/jail and /opt/conf/rc.conf.d/jail will be loaded. If ⟨dir⟩/rc.conf.d/⟨name⟩ is a directory, all of files in the directory will be loaded. Also see the rc_conf_files variable below.
Options are set with
“name=
value”
assignments that use sh(1)
syntax. The following list provides a name and short description for each
variable that can be set in the rc.conf
file:
YES
”, enable output of debug
messages from rc scripts. This variable can be helpful in diagnosing
mistakes when editing or integrating new scripts. Beware that this
produces copious output to the terminal and
syslog(3).NO
”, disable informational messages
from the rc scripts. Informational messages are displayed when a condition
that is not serious enough to warrant a warning or an error occurs.YES
”, show “Starting
foo:” when faststart is used (e.g., at boot time).daemon
”.YES
” to protect only the service
itself, and “ALL
” to protect the
service and all its child processes.
Please note that rc scripts which redefine
${argument}_cmd
This variable has no effect on services running within a jail(8).
YES
”, enable support for Automatic
Power Management with the
apm(8) command.YES
”, these are the flags to pass
to the apmd(8)
daemon.NO
”, disable auto-loading of kernel
modules with
devmatch(8).NO
” by default. Set to
“YES
” to automatically rebuild
linker.hints files with
kldxref(8) at boot
time.NO
” by default. If
kldxref_enable is true, setting to
“YES
” will overwrite existing
linker.hints files at boot time. Otherwise, only
missing linker.hints files are generated.;
’) delimited list of paths
containing kld(4) modules.
If empty, the contents of the kern.module_path
sysctl(8) are
used.YES
”, enable the system power
control facility with the
powerd(8) daemon.YES
”, these are the flags to
pass to the powerd(8)
daemon.YES
” and never happens if set to
“NO
”. If set to anything else, a
memory file system is created if /tmp is not
writable.-S
”, which inhibits the
use of softupdates on /tmp so that file system
space is freed without delay after file truncation or deletion. See
mdmfs(8) for other
options you can use in tmpmfs_flags.YES
” and never happens if set to
“NO
”. If set to anything else, a
memory file system is created if /var is not
writable.-S
”, which inhibits the
use of softupdates on /var so that file system
space is freed without delay after file truncation or deletion. See
mdmfs(8) for other
options you can use in varmfs_flags.YES
” and never happens if set to
“NO
”. If set to anything else, a
memory file system is created if /var is not
writable. Note that this process requires access to certain commands in
/usr before /usr is
mounted on normal systems.YES
” to start
hostapd(8) at system
boot time.NO
” if NIS is not used.YES
” to start the DHCP client in
background. This can cause trouble with applications depending on a
working network, but it will provide a faster startup in many cases.YES
” to start
dhclient(8)
synchronously at startup. This behavior can be overridden on a
per-interface basis by replacing the
“DHCP
” keyword in the
ifconfig_⟨interface⟩
variable with “SYNCDHCP
” or
“NOSYNCDHCP
”.YES
” to load firewall rules at
startup. If the kernel was not built with options
IPFIREWALL
, the ipfw.ko kernel module will
be loaded. See also ipfilter_enable.open
closed
lo0
”client
simple
If a filename is specified, the full path must be given.
YES
” to disable the display of
firewall rules on the console during boot.YES
” to enable firewall event
logging. This is equivalent to the
IPFIREWALL_VERBOSE
kernel option.YES
” to create pseudo interface
ipfw0
for logging. For more details, see
ipfw(8) manual page.YES
” will automatically load the
ipfw(8) NAT kernel module
if firewall_enable is also set to
“YES
”.YES
” will automatically load the
ipfw(8) NAT64 kernel
module if firewall_enable is also set to
“YES
”.YES
” will automatically load the
ipfw(8) NPTv6 kernel
module if firewall_enable is also set to
“YES
”.YES
” will automatically load the
ipfw(8) pmod kernel
module if firewall_enable is also set to
“YES
”.YES
” will automatically load the
dummynet(4) module if
firewall_enable is also set to
“YES
”.YES
” will enable netflow logging
via ng_netflow(4)
By default a ipfw rule is inserted and all packets are duplicated with the ngtee command and netflow packets are sent to 127.0.0.1 on the netflow port using protocol version 5.
YES
” to enable
natd(8).
firewall_enable must also be set to
“YES
”, and
divert(4) sockets must
be enabled in the kernel. If the kernel was not built with
options IPDIVERT
, the
ipdivert.ko kernel module will be loaded.-n
or -a
flag is automatically added with the above
natd_interface as an argument.NO
” by default. Setting this to
“YES
” enables
ipf(8) packet filtering.
Typical usage will require putting
ipfilter_enable="YES" ipnat_enable="YES" ipmon_enable="YES" ipfs_enable="YES"
into /etc/rc.conf and editing /etc/ipf.rules and /etc/ipnat.rules appropriately.
Note that ipfilter_enable and ipnat_enable can be enabled independently. ipmon_enable and ipfs_enable both require at least one of ipfilter_enable and ipnat_enable to be enabled.
Having
options IPFILTER options IPFILTER_LOG options IPFILTER_DEFAULT_BLOCK
in the kernel configuration file is a good idea, too.
NO
” by default. Set it to
“YES
” to enable
ipnat(8) network address
translation. See ipfilter_enable for a detailed
discussion.NO
” by default. Set it to
“YES
” to enable
ipmon(8) monitoring
(logging ipf(8) and
ipnat(8) events).
Setting this variable needs setting ipfilter_enable
or ipnat_enable too. See
ipfilter_enable for a detailed discussion.-Ds
” by default. This variable
contains flags passed to the
ipmon(8) program.
Another typical example would be “-D
/var/log/ipflog” to have
ipmon(8) log directly to
a file bypassing
syslogd(8). Make sure
to adjust /etc/newsyslog.conf in such case like
this:
/var/log/ipflog 640 10 100 * Z /var/run/ipmon.pid
NO
” by default. Set it to
“YES
” to enable
ipfs(8) saving the filter
and NAT state tables during shutdown and reloading them during startup
again. Setting this variable needs setting
ipfilter_enable or
ipnat_enable to
“YES
” too. See
ipfilter_enable for a detailed discussion. Note that
if kern_securelevel is set to 3,
ipfs_enable cannot be used because the raised
securelevel will prevent
ipfs(8) from saving the
state tables at shutdown time.NO
” by default. Setting this to
“YES
” enables
pf(4) packet filtering.
Typical usage will require putting
pf_enable="YES"
into /etc/rc.conf and editing /etc/pf.conf appropriately. Adding
device pf
builds support for pf(4) into the kernel, otherwise the kernel module will be loaded.
YES
”, these flags are passed to the
pfctl(8) program when
loading the ruleset.NO
” by default. Setting this to
“YES
” enables
pflogd(8) which logs
packets from the pf(4)
packet filter.YES
” this controls where
pflogd(8) stores the
logfile (default /var/log/pflog). Check
/etc/newsyslog.conf to adjust logfile rotation for
this.NO
” by default. Setting this to
“YES
” enables
ftp-proxy(8) which
supports the pf(4) packet
filter in translating ftp connections.NO
” by default. Setting this to
“YES
” enables exposing
pf(4) state changes to
other hosts over the network by means of
pfsync(4). The
pfsync_syncdev variable must also be set then.YES
”.YES
” by default. Setting this to
“NO
” disables certain TCP options as
described by RFC 1323.
Setting this to “NO
” might help
remedy such problems with connections as randomly hanging or other weird
behavior. Some network devices are known to be broken with respect to
these options.YES
” by default. Setting to
“NO
” will disable probing idle TCP
connections to verify that the peer is still up and reachable.NO
” by default. Setting to
“YES
” will cause the kernel to
ignore TCP frames that have both the SYN and FIN flags set. This prevents
OS fingerprinting, but may break some legitimate applications.NO
” by default. Setting to
“YES
” will cause the kernel to
ignore ICMP REDIRECT packets. Refer to
icmp(4) for more
information.NO
” by default. Setting to
“YES
” will cause the kernel to log
ICMP REDIRECT packets. Note that the log messages are not rate-limited, so
this option should only be used for troubleshooting networks. Refer to
icmp(4) for more
information.YES
” to respond to broadcast or
multicast ICMP ping packets. Refer to
icmp(4) for more
information.NO
”, this is the first port in the
default portrange. Refer to
ip(4) for more
information.NO
”, this is the last port in the
default portrange. Refer to
ip(4) for more
information.AUTO
”
(the default) for all current interfaces. Setting the
network_interfaces variable to anything other than
the default is deprecated. Interfaces that the administrator wishes to
store configuration for, but not start at boot should be configured with
the “NOAUTO
” keyword in their
ifconfig_⟨interface⟩
variables as described below.
An
ifconfig_⟨interface⟩
variable is also assumed to exist for each value of
interface. When an interface name contains any of
the characters “.-/+
” they are
translated to “_
” before lookup.
The variable can contain arguments to
ifconfig(8), as
well as special case-insensitive keywords described below. Such keywords
are removed before passing the value to
ifconfig(8) while
the order of the other arguments is preserved.
It is possible to add IP alias entries using
ifconfig(8) syntax
with the address family keyword such as inet
.
Assuming that the interface in question was ed0
,
it might look something like this:
ifconfig_ed0_alias0="inet 127.0.0.253 netmask 0xffffffff" ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff"
It also possible to configure multiple IP addresses in
Classless Inter-Domain Routing (CIDR) address notation, whose each
address component can be a range like inet
192.0.2.5-23/24
or inet6
2001:db8:1-f::1/64
. This notation allows address and prefix
length part only, not the other address modifiers. Note that the maximum
number of the generated addresses from a range specification is limited
to an integer value specified in
netif_ipexpand_max in
rc.conf
because a small typo can unexpectedly
generate a large number of addresses. The default value is
2048
. It can be increased by adding the
following line into rc.conf
:
netif_ipexpand_max="4096"
In the case of 192.0.2.5-23/24
, the
address 192.0.2.5 will be configured with the netmask /24 and the
addresses 192.0.2.6 to 192.0.2.23 with the non-conflicting netmask /32
as explained in the
ifconfig(8) alias
section. Note that this special netmask handling is only for
inet
, not for the other address families such as
inet6
.
With the interface in question being
ed0
, an example could look like:
ifconfig_ed0_alias2="inet 192.0.2.129/27" ifconfig_ed0_alias3="inet 192.0.2.1-5/28"
and so on.
Note that ipv4_addrs_⟨interface⟩ variable was supported for IPv4 CIDR address notation. It is now deprecated because the functionality was integrated into ifconfig_⟨interface⟩_alias⟨n⟩ though ipv4_addrs_⟨interface⟩ is still supported for backward compatibility.
For each ifconfig_⟨interface⟩_alias⟨n⟩ entry with an address family keyword, its contents are passed to ifconfig(8). Execution stops at the first unsuccessful access, so if something like this is present:
ifconfig_ed0_alias0="inet 127.0.0.251 netmask 0xffffffff" ifconfig_ed0_alias1="inet 127.0.0.252 netmask 0xffffffff" ifconfig_ed0_alias2="inet 127.0.0.253 netmask 0xffffffff" ifconfig_ed0_alias4="inet 127.0.0.254 netmask 0xffffffff"
Then note that alias4 would
not be added
since the search would stop with the missing
“alias3
” entry. Because of this
difficult to manage behavior, there is
ifconfig_⟨interface⟩_aliases
variable, which has the same functionality as
ifconfig_⟨interface⟩_alias⟨n⟩
and can have all of entries in a variable like the following:
ifconfig_ed0_aliases="\ inet 127.0.0.251 netmask 0xffffffff \ inet 127.0.0.252 netmask 0xffffffff \ inet 127.0.0.253 netmask 0xffffffff \ inet 127.0.0.254 netmask 0xffffffff"
It also supports CIDR notation.
If the /etc/start_if.⟨interface⟩ file is present, it is read and executed by the sh(1) interpreter before configuring the interface as specified in the ifconfig_⟨interface⟩ and ifconfig_⟨interface⟩_alias⟨n⟩ variables.
If a vlans_⟨interface⟩ variable is set, a vlan(4) interface will be created for each item in the list with the vlandev argument set to interface. If a vlan interface's name is a number, then that number is used as the vlan tag and the new vlan interface is named interface.tag. Otherwise, the vlan tag must be specified via a vlan parameter in the create_args_⟨interface⟩ variable.
To create a vlan device named em0.101
on em0
with the vlan tag 101 and the optional
the IPv4 address 192.0.2.1/24:
vlans_em0="101" ifconfig_em0_101="inet 192.0.2.1/24"
To create a vlan device named myvlan
on em0
with the vlan tag 102:
vlans_em0="myvlan" create_args_myvlan="vlan 102"
If a
wlans_⟨interface⟩
variable is set, an
wlan(4) interface will
be created for each item in the list with the
wlandev argument set to
interface. Further wlan cloning arguments may be
passed to the
ifconfig(8)
create
command by setting the
create_args_⟨interface⟩
variable. One or more
wlan(4) devices must be
created for each wireless devices as of FreeBSD
8.0. Debugging flags for
wlan(4) devices as set
by wlandebug(8)
may be specified with an
wlandebug_⟨interface⟩
variable. The contents of this variable will be passed directly to
wlandebug(8).
If the
ifconfig_⟨interface⟩
contains the keyword “NOAUTO
” then
the interface will not be configured at boot or by
/etc/pccard_ether when
network_interfaces is set to
“AUTO
”.
It is possible to bring up an interface with DHCP by adding
“DHCP
” to the
ifconfig_⟨interface⟩
variable. For instance, to initialize the ed0
device via DHCP, it is possible to use something like:
ifconfig_ed0="DHCP"
If you want to configure your wireless interface with
wpa_supplicant(8)
for use with WPA, EAP/LEAP or WEP, you need to add
“WPA
” to the
ifconfig_⟨interface⟩
variable.
On the other hand, if you want to configure your wireless
interface with
hostapd(8), you need
to add “HOSTAP
” to the
ifconfig_⟨interface⟩
variable. hostapd(8)
will use the settings from
/etc/hostapd-⟨interface⟩.conf
Finally, you can add ifconfig(8) options in this variable, in addition to the /etc/start_if.⟨interface⟩ file. For instance, to configure an ath(4) wireless device in station mode with an address obtained via DHCP, using WPA authentication and 802.11b mode, it is possible to use something like:
wlans_ath0="wlan0" ifconfig_wlan0="DHCP WPA mode 11b"
In addition to the ifconfig_⟨interface⟩ form, a fallback variable ifconfig_DEFAULT may be configured. It will be used for all interfaces with no ifconfig_⟨interface⟩ variable. This is intended to replace the no longer supported pccard_ifconfig variable.
It is also possible to rename an interface by doing:
ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00"
If the variable is
“YES
”,
“inet6 accept_rtadv
” is added to
all of
ifconfig_⟨interface⟩_ipv6
and the ipv6_activate_all_interfaces is defined as
“YES
”.
If the variable is
“YES
”, the default address
selection policy table set by
ip6addrctl(8)
will be IPv6-preferred.
If the variable is “NO
”,
the default address selection policy table set by
ip6addrctl(8)
will be IPv4-preferred.
If the variable is “NO
”,
all interfaces which do not have a corresponding
ifconfig_⟨interface⟩_ipv6
variable will be marked as
“IFDISABLED
” at creation. This
means that all of IPv6 functionality on that interface is completely
disabled to enforce a security policy. If the variable is set to
“YES”, the flag will be cleared on all of the
interfaces.
In most cases, just defining an
ifconfig_⟨interface⟩_ipv6
for an IPv6-capable interface should be sufficient. However, if an
interface is added dynamically (by some tunneling protocols such as PPP,
for example), it is often difficult to define the variable in advance.
In such a case, configuring the
“IFDISABLED
” flag can be disabled
by setting this variable to “YES”.
For more details of the
“IFDISABLED
” flag and keywords
“inet6 ifdisabled
”, see
ifconfig(8).
Default is “NO
”.
YES
” privacy addresses will be
generated for each IPv6 interface as described in RFC 4941.This means the specified interface will accept ICMPv6 Router Advertisement messages on that link and add the discovered routers into the Default Router List. While the other interfaces can still accept RA messages if the “inet6 accept_rtadv” option is specified, adding routes into the Default Router List will be disabled by “inet6 no_radr” option by default. See ifconfig(8) for more details.
Note that ICMPv6 Router Advertisement messages will be accepted even when net.inet6.ip6.forwarding is 1 (packet forwarding is enabled) when net.inet6.ip6.rfc6204w3 is set to 1.
Default is “NO
”.
Aliases should be set by
ifconfig_⟨interface⟩_alias⟨n⟩
with “inet6
” keyword. For
example:
ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64"
Interfaces that have an “inet6
accept_rtadv
” keyword in
ifconfig_⟨interface⟩_ipv6
setting will be automatically configured by SLAAC (StateLess Address
AutoConfiguration) described in RFC
4862.
Note that a link-local address will be automatically configured in addition to the configured global-scope addresses because the IPv6 specifications require it on each link. The address is calculated from the MAC address by using an algorithm defined in RFC 4862, Section 5.3.
If only a link-local address is needed on the interface, the following configuration can be used:
ifconfig_ed0_ipv6="inet6 auto_linklocal"
A link-local address can also be configured manually. This is useful for the default router address of an IPv6 router so that it does not change when the network interface card is replaced. For example:
ifconfig_ed0_ipv6="inet6 fe80::1 prefixlen 64"
For example, the following configuration
ipv6_prefix_ed0="2001:db8:1:0 2001:db8:2:0"
is equivalent to the following:
ifconfig_ed0_alias0="inet6 2001:db8:1:: eui64 prefixlen 64" ifconfig_ed0_alias1="inet6 2001:db8:1:: prefixlen 64 anycast" ifconfig_ed0_alias2="inet6 2001:db8:2:: eui64 prefixlen 64" ifconfig_ed0_alias3="inet6 2001:db8:2:: prefixlen 64 anycast"
These Subnet-Router anycast addresses will be added only when ipv6_gateway_enable is YES.
NO
”, this is the default output
interface for scoped addresses. This works only with
ipv6_gateway_enable="NO".ipv4_prefer
”,
“ipv6_prefer
”, or
“AUTO
”.
If “ipv4_prefer
” or
“ipv6_prefer
” is specified,
ip6addrctl(8)
installs a pre-defined policy table described in Section 2.1
(IPv6-preferred) or 10.3 (IPv4-preferred) of RFC 3484.
If “AUTO
” is specified,
it attempts to read a file /etc/ip6addrctl.conf
first. If this file is found,
ip6addrctl(8)
reads and installs it. If not found, a policy is automatically set
according to ipv6_activate_all_interfaces
variable; if the variable is set to
“YES
” the IPv6-preferred one is
used. Otherwise IPv4-preferred.
The default value of ip6addrctl_enable
and ip6addrctl_policy are
“YES
” and
“AUTO
”, respectively.
create
command for each interface by setting the
create_args_⟨interface⟩
variable. If an interface name is specified with “:sticky”
keyword, the interface will not be destroyed even when
rc.d/netif script is invoked with
“stop” argument. This is useful when reconfiguring the
interface without destroying it. Entries in
cloned_interfaces are automatically appended to
network_interfaces for configuration.tunnel
option to
ifconfig(8).
Additionally, this option ensures that each listed interface is created
via the create
option to
ifconfig(8) before
attempting to configure it.
For example, configure two gif(4) interfaces with:
gif_interfaces="gif0 gif1" gifconfig_gif0="100.64.0.1 100.64.0.2" ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" gifconfig_gif1="inet6 2a00::1 2a01::1" ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252"
YES
”, run the
ppp(8) daemon..-/+
” they are translated to
“_
” for the proposes of the override
variable names.auto
”,
“ddial
”,
“direct
” and
“dedicated
”. See the manual for a
full description.YES
”, enables network address
translation. Used in conjunction with gateway_enable
allows hosts on private network addresses access to the Internet using
this host as a network address translating router.-unit
N for details.root
”.YES
”,
/etc/rc.d/zfs will attempt to automatically mount
ZFS file systems and initialize ZFS volumes (ZVOLs).YES
”,
/etc/rc.d/gptboot will log if the system
successfully (or not) booted from a GPT partition, which had the
bootonce attribute set using
gpart(8) utility.YES
”,
/etc/rc.d/gbde will attempt to automatically
initialize your .bde devices in /etc/fstab.AUTO
”.The lockfile for each individual gbde(4) device can be overridden by setting the variable gbde_lock_⟨device⟩, where device is the encrypted device without the “/dev/” and “.bde” parts.
YES
”. This can be changed for every
device separately by defining the
geli_⟨device⟩_autodetach
variable.YES
” by default. After the file
systems are checked at boot time, the root file system is remounted as
read-write if this is set to “YES
”.
Diskless systems that mount their root file system from a read-only remote
NFS share should set this to “NO
” in
their rc.conf.YES
”,
fsck(8) will be run with
the -y
flag if the initial preen of the file
systems fails.NO
”, the system will not attempt to
run fsck(8) in the
background where possible.0 4 * * * root /etc/rc.d/bgfsck
forcestart
to /etc/crontab.
NO
” (the default), this variable
extends the list of file system types for which automatic mounting at
startup by rc(8) should be
delayed until the network is initialized. It should contain a
whitespace-separated list of network file system descriptor pairs, each
consisting of a file system type as passed to
mount(8) and a
human-readable, one-word description, joined with a colon
(‘:
’). Extending the default list in
this way is only necessary when third party file system types are
used.YES
”, run the
syslogd(8)
daemon.YES
”, these are the flags to
pass to
syslogd(8).YES
”, run the
inetd(8) daemon.YES
”, these are the flags to
pass to inetd(8).YES
”, run the
hastd(8) daemon.YES
”, these are the flags to
pass to hastd(8).YES
”, run the
unbound(8) daemon as a
local caching resolver.YES
” to start a Kerberos 5
authentication server at boot time.YES
” this is the path to Kerberos 5
Authentication Server.YES
” to start
kadmind(8), the
Kerberos 5 Administration Daemon; set to
“NO
” on a slave server.YES
” this is the path to
Kerberos 5 Administration Daemon.YES
” to start
kpasswdd(8), the
Kerberos 5 Password-Changing Daemon; set to
“NO
” on a slave server.YES
” this is the path to
Kerberos 5 Password-Changing Daemon.YES
” to start
kfd(8), the Kerberos 5
ticket forwarding daemon, at the boot time.YES
”, run the
rwhod(8) daemon at boot
time.YES
”, these are the flags to
pass to it.YES
”, run the
amd(8) daemon at boot
time.YES
”, these are the flags to pass
to it. See the amd(8)
manpage for more information.YES
”,
/etc/motd will be updated at boot time to reflect
the kernel release being run. If set to
“NO
”,
/etc/motd will not be updated.YES
”, run the NFS client daemons at
boot time.YES
”, this can be set to
“0
” to disable NFS ACCESS RPC
caching, or to the number of seconds for which NFS ACCESS results should
be cached. A value of 2-10 seconds will substantially reduce network
traffic for many NFS operations.YES
”, run the NFS server daemons at
boot time.YES
”, these are the flags to
pass to the nfsd(8)
daemon.YES
” and
nfsv4_server_enable are set to
“YES
”, enable the server for NFSv4
as well as NFSv2 and NFSv3.YES
”, run the nfsuserd
daemon, which is needed for NFSv4 in order to map between user/group names
vs uid/gid numbers. If nfsv4_server_enable is set to
“YES
”, this will be forced
enabled.YES
”, these are the flags to
pass to the
nfsuserd(8)
daemon.YES
”, run the nfscbd daemon,
which enables callbacks/delegations for the NFSv4 client.YES
”, these are the flags to
pass to the nfscbd(8)
daemon.YES
”, and no
nfs_server_enable is set, start
mountd(8), but not
nfsd(8) daemon. It is
commonly needed to run CFS without real NFS used.YES
”, these are the flags to
pass to the mountd(8)
daemon.YES
”, allow services like PCNFSD to
make non-privileged mount requests.YES
”, provide NFS services only on
a secure port.YES
” and also an NFS server or
client, run
rpc.lockd(8) at boot
time.YES
”, these are the flags to
pass to the
rpc.lockd(8)
daemon.YES
” and also an NFS server or
client, run
rpc.statd(8) at boot
time.YES
”, these are the flags to
pass to the
rpc.statd(8)
daemon.YES
”, run the
rpcbind(8) service at
boot time.YES
”, these are the flags to
pass to the rpcbind(8)
daemon.YES
”, run the
keyserv(8) daemon on
boot for running Secure RPC.YES
”, these are the flags to
pass to keyserv(8)
daemon.YES
”, run the
pppoed(8) daemon at
boot time to provide PPP over Ethernet services.YES
”.YES
”, run the
timed(8) service at boot
time. This command is intended for networks of machines where a consistent
“network time” for all hosts must be established. This is
often useful in large NFS environments where time stamps on files are
expected to be consistent network-wide.YES
”, these are the flags to
pass to the timed(8)
service.YES
”, run
ntpdate(8) at system
startup. This command is intended to synchronize the system clock only
once
from some standard reference.
Note that the use of the ntpd_sync_on_start variable is a preferred alternative to the ntpdate(8) utility as ntpdate(8) is to be retired from the NTP distribution.
YES
”, these are the flags to
pass to the ntpdate(8)
command (typically a hostname).YES
”, run the
ntpd(8) command at boot
time.YES
”, these are the flags to pass
to the ntpd(8)
daemon.YES
”,
ntpd(8) is run with the
-g
flag, which syncs the system's clock on
startup. See ntpd(8) for
more information regarding the -g
option. This is
a preferred alternative to using
ntpdate(8) or
specifying the ntpdate_enable variable.YES
”, run the
ypbind(8) service at
system boot time.YES
”, these are the flags to
pass to the ypbind(8)
service.YES
”, run the
ypldap(8) daemon at
system boot time.YES
”, these are the flags to
pass to the ypldap(8)
daemon.YES
”, run the
ypset(8) daemon at
system boot time.YES
”, these are the flags to
pass to the ypset(8)
daemon.YES
”, run the
ypserv(8) daemon at
system boot time.YES
”, these are the flags to
pass to the ypserv(8)
daemon.YES
”, run the
rpc.ypxfrd(8)
daemon at system boot time.YES
”, these are the flags to
pass to the
rpc.ypxfrd(8)
daemon.YES
”, run the
rpc.yppasswdd(8)
daemon at system boot time.YES
”, these are the flags
to pass to the
rpc.yppasswdd(8)
daemon.YES
”, run the
rpc.ypupdated
daemon at system boot time.YES
”, run the
bsnmpd(1) daemon at
system boot time. Be sure to understand the security implications of
running SNMP daemon on your host.YES
”, these are the flags to
pass to the bsnmpd(1)
daemon.NO
”, create a default route to this
host name or IP address (use an IP address if this router is also required
to get to the name server!).arp
-S
”
operation. For example
static_arp_pairs="gw" static_arp_gw="192.168.1.1 00:01:02:03:04:05"
ndp
-s
”
operation. For example
static_ndp_pairs="gw" static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05"
NO
” then for each whitespace
separated element in the value, a
route_⟨element⟩
variable is assumed to exist whose contents will later be passed to a
“route
add
”
operation. For example:
static_routes="ext mcast:gif0 gif0local:gif0" route_ext="-net 10.0.0.0/24 -gateway 192.168.0.1" route_mcast="-net 224.0.0.0/4 -iface gif0" route_gif0local="-host 169.254.1.1 -iface lo0"
When an element is in the form of
name:ifname
, the route is specific to the
interface ifname
.
NO
” then for each whitespace
separated element in the value, a
ipv6_route_⟨element⟩
variable is assumed to exist whose contents will later be passed to a
“route
add
-inet6
” operation.YES
”, configure host to act as an
IP router, e.g. to forward packets between interfaces.YES
”, run a routing daemon of some
sort, based on the settings of routed_program and
routed_flags.YES
”, run a routing daemon of some
sort, based on the settings of route6d_program and
route6d_flags.YES
”, this is the name of the
routing daemon to use.YES
”, these are the flags to
pass to the routing daemon.YES
”, run the
rtadvd(8) daemon at
boot time. The
rtadvd(8) utility sends
ICMPv6 Router Advertisement messages to the interfaces specified in
rtadvd_interfaces. This should only be enabled with
great care. You may want to fine-tune
rtadvd.conf(5).YES
” this is the list of
interfaces to use.YES
”, enable global proxy ARP.YES
” and
gateway_enable is also set to
“YES
”, source-routed packets are
forwarded.YES
”, the system will accept
source-routed packets directed at it.YES
”, run the
rarpd(8) daemon at
system boot time.YES
”, these are the flags to
pass to the rarpd(8)
daemon.YES
”, run the
bootparamd(8)
daemon at system boot time.YES
”, these are the flags to
pass to the
bootparamd(8)
daemon.NO
”, this is the local IPv4 address
for 6to4 (IPv6 over IPv4 tunneling interface). Specify this entry to
enable the 6to4 interface.AUTO
”.YES
” this enables IPv4 mapped IPv6
address communication (like ::ffff:a.b.c.d
).YES
” to enable the
rtsold(8) daemon to
send ICMPv6 Router Solicitation messages.YES
”, these are the flags to
pass to rtsold(8).inet6 accept_rtadv
” keyword, these
are the flags to pass to
rtsol(8).
Note that rtsold_enable is mutually exclusive to rtsol_flags; rtsold_enable takes precedence.
normal
”,
“visual
”,
“off
”, or
“NO
” if the default behavior is
desired. For details, refer to the
kbdcontrol(1)
manpage.NO
”, no keymap is installed,
otherwise the value is used to install the keymap file found in
/usr/share/syscons/keymaps/⟨value⟩.kbd
(if using syscons(4))
or
/usr/share/vt/keymaps/⟨value⟩.kbd
(if using vt(4)).slow
”,
“normal
”,
“fast
”, or
“NO
” if the default behavior is
desired.NO
”, attempt to program the
function keys with the value. The value should be a single string of the
form: “funkey_number new_value
[funkey_number new_value ...]”.normal
”,
“blink
”,
“destructive
”, or
“NO
” to set the cursor behavior
explicitly or choose the default behavior.NO
”, no screen map is installed,
otherwise the value is used to install the screen map file in
/usr/share/syscons/scrnmaps/⟨value⟩.
This parameter is ignored when using
vt(4) as the console
driver.NO
”, the default 8x16 font value is
used for screen size requests, otherwise the value in
/usr/share/syscons/fonts/⟨value⟩
or
/usr/share/vt/fonts/⟨value⟩
is used (depending on the console driver being used).NO
”, the default 8x14 font value is
used for screen size requests, otherwise the value in
/usr/share/syscons/fonts/⟨value⟩
or
/usr/share/vt/fonts/⟨value⟩
is used (depending on the console driver being used).NO
”, the default 8x8 font value is
used for screen size requests, otherwise the value in
/usr/share/syscons/fonts/⟨value⟩
or
/usr/share/vt/fonts/⟨value⟩
is used (depending on the console driver being used).NO
”, the default screen blanking
interval is used, otherwise it is set to value
seconds.NO
”, this is the actual screen
saver to use (blank
,
snake
, daemon
, etc).NO
”, the mouse device specified on
the command line is not automatically treated as enabled by the
/etc/rc.d/moused script. Having this variable set
to “YES
” allows a
usb(4) mouse, for example,
to be enabled as soon as it is plugged in.YES
”, the
moused(8) daemon is
started for doing cut/paste selection on the console.YES
”. The
moused(8) daemon is
able to detect the appropriate mouse type automatically in many cases. Set
this variable to “auto
” to let the
daemon detect it, or select one from the following list if the automatic
detection fails.
If the mouse is attached to the PS/2 mouse port, choose
“auto
” or
“ps/2
”, regardless of the brand
and model of the mouse. Likewise, if the mouse is attached to the bus
mouse port, choose “auto
” or
“busmouse
”. All other protocols
are for serial mice and will not work with the PS/2 and bus mice. If
this is a USB mouse, “auto
” is the
only protocol type which will work.
microsoft
intellimouse
mousesystems
mmseries
logitech
busmouse
mouseman
glidepoint
thinkingmouse
ps/2
mmhittab
x10mouseremote
versapad
Even if the mouse is not in the above list, it may be compatible with one in the list. Refer to the manual page for moused(8) for compatibility information.
It should also be noted that while this is enabled, any other
client of the mouse (such as an X server) should access the mouse
through the virtual mouse device, /dev/sysmouse,
and configure it as a “sysmouse
”
type mouse, since all mouse data is converted to this single canonical
format when using
moused(8). If the
client program does not support the
“sysmouse
” type, specify the
“mousesystems
” type. It is the
second preferred type.
YES
”, this is the actual port
the mouse is on. It might be /dev/cuau0 for a COM1
serial mouse, /dev/psm0 for a PS/2 mouse or
/dev/mse0 for a bus mouse, for example.-3
” for the
default moused_flags to make your laptop's touchpad
more comfortable to use, but an empty set of options for
moused_ums0_flags when your
usb(4) mouse has three or
more buttons.NO
”, the default mouse cursor
character range 0xd0
-0xd3
is used, otherwise the range start is set to value
character, see
vidcontrol(1). Use
if the default range is occupied in the language code table.-m
on
” will
enable the mouse pointer on all virtual terminals if
moused_enable is set to
“YES
”.-h
200
”
will set the
syscons(4) or
vt(4) scrollback (history)
buffer to 200 lines.YES
”, run the
cron(8) daemon at system
boot time.YES
”, these are the flags to pass
to cron(8).YES
”, enable the special handling
of transitions to and from the Daylight Saving Time in
cron(8) (equivalent to
using the flag -s
).YES
”, run the
lpd(8) daemon at system
boot time.YES
”, these are the flags to pass
to the lpd(8) daemon.YES
”, run the
chkprintcap(8)
command before starting the
lpd(8) daemon.YES
”, these are the flags to pass
to the
chkprintcap(8)
program. The default is “-d
”, which
causes missing directories to be created.AUTO
”, the first suitable swap
device listed in /etc/fstab will be used as dump
device. Otherwise, the value of this variable is passed as the argument to
dumpon(8). To disable
crash dumps, set this variable to
“NO
”.NO
” to not run
savecore(8) at boot
time when dumpdir is set.NO
”, disable automatic extraction
of the crash dump from the dumpdev.YES
” to turn on user and group disk
quotas on system startup via the
quotaon(8) command for
all file systems marked as having quotas enabled in
/etc/fstab. The kernel must be built with
options QUOTA
for disk quotas to function.YES
” to enable user and group disk
quota checking via the
quotacheck(8)
command.YES
”, and
check_quotas is set to
“YES
”, these are the flags to pass
to the
quotacheck(8)
utility. The default is “-a
”, which
checks quotas for all file systems with quotas enabled in
/etc/fstab.YES
”, these are the flags to
pass to the quotaon(8)
utility. The default is “-a
”, which
enables quotas for all file systems with quotas enabled in
/etc/fstab.YES
”, these are the flags to
pass to the
quotaoff(8) utility
when shutting down the quota system. The default is
“-a
”, which disables quotas for all
file systems with quotas enabled in
/etc/fstab.YES
” to enable system accounting
through the accton(8)
facility.YES
” to enable iBCS2 (SCO) binary
emulation at system initial boot time.NO
” and if
ibcs2_enable is set to
“YES
”, this specifies a list of
additional iBCS2 loaders to enable.YES
” to enable Linux/ELF binary
emulation at system initial boot time.YES
”, load System V IPC primitives
at boot time.YES
” to have
/tmp cleaned at startup.NO
” to disable removing of X11 lock
files, and the removal and (secure) recreation of the various socket
directories for X11 related programs.YES
” to
disable that security check during system startup.ldconfig
-32
”.YES
” to set the kernel security
level at system startup.YES
” to start
sshd(8) at system boot
time.YES
”, these are the flags to pass
to the sshd(8)
daemon.YES
” to start
ftpd(8) as a stand-alone
daemon at system boot time.YES
”, these are the additional
flags to pass to the
ftpd(8) daemon.YES
”, start the
watchdogd(8) daemon
at boot time. This requires that the kernel have been compiled with a
watchdog(4)
compatible device.YES
”, these are the flags
passed to the
watchdogd(8)
daemon.YES
”, this is a timeout that
will be used by the
watchdogd(8) daemon.
If this option is set, it overrides -t
in
watchdogd_flags.YES
”, this is a timeout that
will be set by the
watchdogd(8) daemon
when it exits during the system shutdown. This timeout will not be set
when returning to the single-user mode or when the watchdogd service is
stopped individually using the
service(8) command or
the rc.d script. Note that the timeout will be applied if
watchdogd(8) is
stopped outside of rc(8)
framework. If this option is set, it overrides -x
in watchdogd_flags.LOW
” indicates that
acpi(4) should use the
lowest power state available while
“HIGH
” indicates that the lowest
latency state (less power savings) should be used.LOW
” indicates that
cpufreq(4) should use
the lowest frequency available while
“HIGH
” indicates that the highest
frequency (less power savings) should be used.LOW
” indicates that
acpi(4) should use the
lowest power state available while
“HIGH
” indicates that the lowest
latency state (less power savings) should be used.LOW
” indicates that
cpufreq(4) should use
the lowest frequency available while
“HIGH
” indicates that the highest
frequency (less power savings) should be used.NO
”, any configured jails will not
be started.YES
”, all configured jails will be
started in the background (in parallel).YES
”, all configured jails in
jail_list are stopped in reverse order.rc.conf
variables. For example, hostname of a jail
named vjail
was able to be set by
jail_vjail_hostname
. These per-jail configuration
variables are now obsolete in favor of
jail(8) configuration
file. For backward compatibility, when per-jail configuration variables
are defined, jail(8)
configuration files are created as
/var/run/jail.⟨jname⟩.conf
and used.
The following per-jail parameters are handled by
rc.d/jail script out of their corresponding
rc.conf
variables. In addition to them,
parameters in
jail_⟨jname⟩_parameters
will be added to the configuration file. They must be a semi-colon
(‘;
’) delimited list of
“key=value”. For more details, see
jail(8) manual
page.
path
host.hostname
exec.consolelog
interface
vnet.interface
vnet
parameter will be enabled
and cannot be specified with
jail_⟨jname⟩_interface,
jail_⟨jname⟩_ip
and/or
jail_⟨jname⟩_ip_multi⟨n⟩
at the same time.fstab
mount
exec.fib
exec.start
command
in some older
releases.exec.prestart
exec.poststart
exec.stop
exec.prestop
exec.poststop
ip4.addr
ip6.addr
allow.mount
mount.devfs
devfs_ruleset
mount.fdescfs
allow.set_hostname
allow.rawsocket
allow.sysvipc
NO
” to disable caching entropy via
cron(8). Otherwise set to
the directory in which the entropy files are stored. To be useful, there
must be a system cron job that regularly writes and rotates files here.
All files found will be used at boot time. The default is
/var/db/entropy.NO
” to disable caching entropy
through reboots. Otherwise set to the name of a file used to store cached
entropy. This file should be located on a file system that is readable
before all the volumes specified in
fstab(5) are mounted. By
default, /entropy is used, but if
/var/db/entropy-file is found it will also be
used. This will be of some use to
bsdinstall(8).NO
” to disable very early caching
entropy through reboots. Otherwise set to the filename used to read very
early reboot cached entropy. This file should be located where
loader(8) can read it.
See also
loader.conf(5).
The default location is /boot/entropy.save-entropy
periodically.save-entropy
periodically.YES
” to run
setkey(8) on
ipsec_file at boot time.YES
” to save
dmesg(8) to
/var/run/dmesg.boot on boot.NO
” to prevent the system from
trying to recover pre-maturely terminated
vi(1) sessions.YES
” to load the
mac_bsdextended(4)
module upon system initialization and load a default ruleset file.YES
”, run
newsyslog(8) command
at startup.YES
”, these are the flags to
pass to the
newsyslog(8)
program. The default is “-CN
”, which
causes log files flagged with a C
to be
created.-t
type must be specified and either a
-s
size for malloc or swap
backed md(4) devices or a
-f
file for vnode backed
md(4) devices. Note that
mdconfig_md⟨X⟩
variables are evaluated until one variable is unset or null.eval
and that both _dev
and _mp variables can be used to reference
respectively the md(4)
device and the mount point. Assuming that the
md(4) device is
md0
, one could set the following:
mdconfig_md0_cmd="tar xfzC /var/file.tgz \${_mp}"
NO
” then for each
whitespace separated element in the value, a
autobridge_⟨element⟩
variable is assumed to exist which has a whitespace separated list of
interface names to match, these names can use wildcards. For example:
autobridge_interfaces="bridge0" autobridge_bridge0="tap* dc0 vlan[345]"
YES
”, enable support for sound
mixer.YES
”, enable Bluetooth security
daemon.YES
”, enable Bluetooth Service
Discovery Protocol daemon.nobody
”.nobody
”.YES
”, enable Bluetooth Human
Interface Device daemon.YES
”, enable Bluetooth RFCOMM PPP
wrapper daemon..-/+
” they are translated to
“_
” for the proposes of the override
variable names.ANY
” address. The
address can be specified as BD_ADDR or name.NO
”.NO
”.YES
”, change the USB Bluetooth
controller from HID mode to HCI mode. You also need to specify the
location of USB Bluetooth controller with the
ubthidhci_busnum and
ubthidhci_addr variables.YES
”, delays the start of
network-reliant services until netwait_if is up and
ICMP packets to a destination defined in netwait_ip
are flowing. Link state is examined first, followed by
“pinging
” an IP address to verify
network usability. If no destination can be reached or timeouts are
exceeded, network services are started anyway with no guarantee that the
network is usable. Use of this variable requires both
netwait_ip and netwait_if to
be set.ping
” against each IP
address in netwait_ip, at a rate of one ping per
second. If any of the pings are successful, full network connectivity is
considered reliable. The default is 60.status: no
carrier
”. Once gone, the link is considered up. This can be
a vlan(4) interface if
desired.YES
”, load
rctl(8) rules from the
defined ruleset. The kernel must be built with options
RACCT
and options RCTL
.YES
”, start the
automount(8) utility
and the
automountd(8) and
autounmountd(8)
daemons at boot time.YES
”, these are the flags to
pass to the
automount(8)
program. By default no flags are passed.YES
”, these are the flags to
pass to the
automountd(8)
daemon. By default no flags are passed.YES
”, these are the flags to
pass to the
autounmountd(8)
daemon. By default no flags are passed.YES
”, start the
ctld(8) daemon at boot
time.YES
”, start the
iscsid(8) daemon at
boot time.YES
”, start the
iscsictl(8) utility
at boot time.YES
”, these are the flags to
pass to the
iscsictl(8) program.
The default is “-Aa
”, which
configures sessions based on the /etc/iscsi.conf
configuration file.YES
”, create and export an USB LUN
using cfumass(4) at
boot time.YES
”,
‘service
delete
’ removes empty
“rc.conf.d
” files.chmod(1), gdb(1), info(1), kbdcontrol(1), limits(1), protect(1), sh(1), vi(1), vidcontrol(1), bridge(4), dummynet(4), ip(4), ipf(4), ipfw(4), ipnat(4), kld(4), pf(4), pflog(4), pfsync(4), tcp(4), udp(4), exports(5), fstab(5), ipf(5), ipnat(5), jail.conf(5), loader.conf(5), login.conf(5), motd(5), newsyslog.conf(5), pf.conf(5), security(7), accton(8), amd(8), apm(8), bsdinstall(8), bthidd(8), chkprintcap(8), chown(8), cron(8), devfs(8), dhclient(8), ftpd(8), geli(8), hcsecd(8), ifconfig(8), inetd(8), iovctl(8), ipf(8), ipfw(8), ipnat(8), jail(8), kldxref(8), loader(8), lpd(8), makewhatis(8), mdconfig(8), mdmfs(8), mixer(8), mountd(8), moused(8), newfs(8), newsyslog(8), nfsd(8), ntpd(8), ntpdate(8), pfctl(8), pflogd(8), ping(8), powerd(8), quotacheck(8), quotaon(8), rc(8), rc.sendmail(8), rc.subr(8), rfcomm_pppd(8), route(8), routed(8), rpc.lockd(8), rpc.statd(8), rpcbind(8), rwhod(8), savecore(8), sdpd(8), service(8), sshd(8), swapon(8), sysctl(8), syslogd(8), sysrc(8), timed(8), unbound(8), usbconfig(8), wlandebug(8), yp(8), ypbind(8), ypserv(8), ypset(8)
The rc.conf
file appeared in
FreeBSD 2.2.2.
Jordan K. Hubbard.
July 7, 2022 | midnightbsd-3.1 |