003 File Manager
Current Path:
/etc/rc.d
etc
/
rc.d
/
📁
..
📄
DAEMON
(178 B)
📄
FILESYSTEMS
(351 B)
📄
LOGIN
(342 B)
📄
NETWORKING
(299 B)
📄
SERVERS
(209 B)
📄
accounting
(1.64 KB)
📄
addswap
(319 B)
📄
adjkerntz
(219 B)
📄
apm
(595 B)
📄
archdep
(298 B)
📄
auditd
(587 B)
📄
auditdistd
(384 B)
📄
automount
(414 B)
📄
automountd
(369 B)
📄
autounmountd
(318 B)
📄
bgfsck
(968 B)
📄
blacklistd
(1.66 KB)
📄
bluetooth
(8.91 KB)
📄
bootparams
(303 B)
📄
bridge
(2.22 KB)
📄
bsnmpd
(347 B)
📄
bthidd
(928 B)
📄
ccd
(300 B)
📄
cfumass
(2.93 KB)
📄
cleanvar
(908 B)
📄
cleartmp
(1.8 KB)
📄
cron
(368 B)
📄
ctld
(376 B)
📄
ddb
(538 B)
📄
defaultroute
(1.43 KB)
📄
devd
(684 B)
📄
devfs
(1.36 KB)
📄
devmatch
(2.29 KB)
📄
dhclient
(1.37 KB)
📄
dmesg
(412 B)
📄
dumpon
(1.3 KB)
📄
fsck
(1.61 KB)
📄
ftp-proxy
(2.3 KB)
📄
ftpd
(376 B)
📄
gbde
(2.1 KB)
📄
geli
(3.5 KB)
📄
geli2
(1.88 KB)
📄
gptboot
(2.46 KB)
📄
growfs
(3.1 KB)
📄
gssd
(228 B)
📄
hastd
(505 B)
📄
hcsecd
(463 B)
📄
hostapd
(621 B)
📄
hostid
(3.65 KB)
📄
hostid_save
(586 B)
📄
hostname
(2.56 KB)
📄
inetd
(344 B)
📄
iovctl
(445 B)
📄
ip6addrctl
(2.52 KB)
📄
ipfilter
(2.03 KB)
📄
ipfs
(1.05 KB)
📄
ipfw
(3.04 KB)
📄
ipfw_netflow
(1.92 KB)
📄
ipmon
(723 B)
📄
ipnat
(506 B)
📄
ippool
(579 B)
📄
ipropd_master
(703 B)
📄
ipropd_slave
(509 B)
📄
ipsec
(1.11 KB)
📄
iscsictl
(335 B)
📄
iscsid
(309 B)
📄
jail
(13.88 KB)
📄
kadmind
(518 B)
📄
kdc
(469 B)
📄
keyserv
(411 B)
📄
kfd
(297 B)
📄
kld
(1.66 KB)
📄
kldxref
(709 B)
📄
kpasswdd
(498 B)
📄
ldconfig
(1.93 KB)
📄
linux
(1.47 KB)
📄
local
(529 B)
📄
local_unbound
(2.71 KB)
📄
localpkg
(1.35 KB)
📄
lockd
(625 B)
📄
lpd
(416 B)
📄
mdconfig
(4.98 KB)
📄
mdconfig2
(5.86 KB)
📄
mixer
(2.4 KB)
📄
motd
(1.28 KB)
📄
mountcritlocal
(1.2 KB)
📄
mountcritremote
(1.82 KB)
📄
mountd
(1.48 KB)
📄
mountlate
(723 B)
📄
moused
(1.6 KB)
📄
msgs
(396 B)
📄
natd
(762 B)
📄
netif
(5.72 KB)
📄
netoptions
(2.71 KB)
📄
netwait
(3 KB)
📄
newsyslog
(459 B)
📄
nfscbd
(284 B)
📄
nfsclient
(1.03 KB)
📄
nfsd
(1.19 KB)
📄
nfsuserd
(514 B)
📄
nisdomain
(1.76 KB)
📄
nscd
(1.04 KB)
📄
ntpd
(7.11 KB)
📄
ntpdate
(696 B)
📄
opensm
(444 B)
📄
os-release
(952 B)
📄
othermta
(286 B)
📄
pf
(1.17 KB)
📄
pflog
(2.24 KB)
📄
pfsync
(787 B)
📄
power_profile
(2.06 KB)
📄
powerd
(429 B)
📄
ppp
(2.28 KB)
📄
pppoed
(585 B)
📄
pwcheck
(428 B)
📄
quota
(576 B)
📄
random
(2.86 KB)
📄
rarpd
(339 B)
📄
rctl
(469 B)
📄
resolv
(2.02 KB)
📄
rfcomm_pppd_server
(2.31 KB)
📄
root
(724 B)
📄
route6d
(369 B)
📄
routed
(409 B)
📄
routing
(7.91 KB)
📄
rpcbind
(331 B)
📄
rtadvd
(1.62 KB)
📄
rtsold
(430 B)
📄
rwho
(247 B)
📄
savecore
(1.27 KB)
📄
sdpd
(465 B)
📄
securelevel
(519 B)
📄
sendmail
(6.42 KB)
📄
serial
(4.98 KB)
📄
sppp
(835 B)
📄
sshd
(1.41 KB)
📄
statd
(587 B)
📄
static_arp
(2.12 KB)
📄
static_ndp
(2.09 KB)
📄
stf
(1.83 KB)
📄
swap
(224 B)
📄
swaplate
(258 B)
📄
syscons
(7.75 KB)
📄
sysctl
(592 B)
📄
syslogd
(1.48 KB)
📄
sysvipc
(323 B)
📄
tmp
(2.19 KB)
📄
ubthidhci
(762 B)
📄
ugidfw
(992 B)
📄
utx
(266 B)
📄
var
(3.16 KB)
📄
virecover
(1.55 KB)
📄
watchdogd
(2.65 KB)
📄
wpa_supplicant
(817 B)
📄
ypbind
(504 B)
📄
ypldap
(358 B)
📄
yppasswdd
(584 B)
📄
ypserv
(584 B)
📄
ypset
(544 B)
📄
ypupdated
(496 B)
📄
ypxfrd
(540 B)
📄
zfs
(872 B)
📄
zfsbe
(1.65 KB)
📄
zfsd
(209 B)
📄
zpool
(457 B)
📄
zvol
(736 B)
Editing: routing
#!/bin/sh # # Configure routing and miscellaneous network tunables # # $FreeBSD$ # # PROVIDE: routing # REQUIRE: netif ppp stf # KEYWORD: nojailvnet . /etc/rc.subr . /etc/network.subr name="routing" desc="Routing setup" start_cmd="routing_start doall" stop_cmd="routing_stop" extra_commands="options static" static_cmd="routing_start static" options_cmd="routing_start options" ROUTE_CMD="/sbin/route" routing_start() { local _cmd _af _if _a _ret _cmd=$1 _af=$2 _if=$3 _ret=0 case $_if in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) _if="" ;; esac case $_af in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6; do afexists $_a || continue setroutes $_cmd $_a $_if || _ret=1 done ;; *) if afexists $_af; then setroutes $_cmd $_af $_if || _ret=1 else err 1 "Unsupported address family: $_af." fi ;; esac return $_ret } routing_stop() { local _af _if _a _af=$1 _if=$2 case $_if in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) _if="" ;; esac case $_af in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6; do afexists $_a || continue eval static_${_a} delete $_if # When $_if is specified, do not flush routes. if ! [ -n "$_if" ]; then eval routing_stop_${_a} fi done ;; *) if afexists $_af; then eval static_${_af} delete $_if # When $_if is specified, do not flush routes. if ! [ -n "$_if" ]; then eval routing_stop_${_af} fi else err 1 "Unsupported address family: $_af." fi ;; esac } setroutes() { local _ret _ret=0 case $1 in static) static_$2 add $3 _ret=$? ;; options) options_$2 ;; doall) static_$2 add $3 _ret=$? options_$2 ;; esac return $_ret } routing_stop_inet() { ${ROUTE_CMD} -n flush -inet } routing_stop_inet6() { local i ${ROUTE_CMD} -n flush -inet6 for i in `list_net_interfaces`; do if ipv6if $i; then ifconfig $i inet6 -defaultif fi done } get_fibmod() { local _fibs _fibs=$((`${SYSCTL_N} net.fibs` - 1)) if [ ${_fibs} -gt 0 ]; then echo "-fib 0-${_fibs}" else echo fi } static_inet() { local _action _if _skip _fibmod _action=$1 _if=$2 _fibmod=`get_fibmod` # Provide loopback route in all routing tables. This has to come # first so that any following routes can be added. static_routes="_loopback ${static_routes}" route__loopback="-inet 127.0.0.1 -iface lo0 ${_fibmod}" # Add default route. case ${defaultrouter} in [Nn][Oo] | '') ;; *) static_routes="${static_routes} _default" route__default="default ${defaultrouter}" ;; esac # Install configured routes. if [ -n "${static_routes}" ]; then for i in ${static_routes}; do _skip=0 if [ -n "$_if" ]; then case $i in *:$_if) ;; *) _skip=1 ;; esac fi if [ $_skip = 0 ]; then route_args=`get_if_var ${i%:*} route_IF` if [ -n "$route_args" ]; then ${ROUTE_CMD} ${_action} ${route_args} else warn "route_${i%:*} not found." fi fi done fi } static_inet6() { local _action _if _skip fibmod allfibs _action=$1 _if=$2 fibmod=`get_fibmod` # Add pre-defined static routes first. ipv6_static_routes="_v4mapped _v4compat ${ipv6_static_routes}" ipv6_static_routes="_lla _llma ${ipv6_static_routes}" ipv6_static_routes="_loopback ${ipv6_static_routes}" # disallow "internal" addresses to appear on the wire ipv6_route__v4mapped="::ffff:0.0.0.0 -prefixlen 96 ::1 -reject ${fibmod}" ipv6_route__v4compat="::0.0.0.0 -prefixlen 96 ::1 -reject ${fibmod}" # Create a loopback route in every fib ipv6_route__loopback="::1 -prefixlen 128 -iface lo0 ${fibmod}" # Disallow link-local unicast packets without outgoing scope # identifiers. However, if you set "ipv6_default_interface", # for the host case, you will allow to omit the identifiers. # Under this configuration, the packets will go to the default # interface. ipv6_route__lla="fe80:: -prefixlen 10 ::1 -reject ${fibmod}" ipv6_route__llma="ff02:: -prefixlen 16 ::1 -reject ${fibmod}" # Add default route. case ${ipv6_defaultrouter} in [Nn][Oo] | '') ;; *) ipv6_static_routes="${ipv6_static_routes} _default" ipv6_route__default="default ${ipv6_defaultrouter}" ;; esac # Install configured routes. if [ -n "${ipv6_static_routes}" ]; then for i in ${ipv6_static_routes}; do _skip=0 if [ -n "$_if" ]; then case $i in *:$_if) ;; *) _skip=1 ;; esac fi if [ $_skip = 0 ]; then ipv6_route_args=`get_if_var ${i%:*} ipv6_route_IF` if [ -n "$ipv6_route_args" ]; then ${ROUTE_CMD} ${_action} \ -inet6 ${ipv6_route_args} else warn "route_${i%:*} not found" fi fi done fi # Install the "default interface" to kernel, which will be used # as the default route when there's no router. # Disable installing the default interface when we act # as router to avoid conflict between the default # router list and the manual configured default route. if checkyesno ipv6_gateway_enable; then return fi case "${ipv6_default_interface}" in [Nn][Oo] | [Nn][Oo][Nn][Ee]) return ;; [Aa][Uu][Tt][Oo] | "") for i in ${ipv6_network_interfaces}; do case $i in [Nn][Oo][Nn][Ee]) return ;; lo0) continue ;; esac laddr=`network6_getladdr $i exclude_tentative` case ${laddr} in '') ;; *) ipv6_default_interface=$i break ;; esac done ;; esac ifconfig ${ipv6_default_interface} inet6 defaultif ${SYSCTL} net.inet6.ip6.use_defaultzone=1 > /dev/null } ropts_init() { if [ -z "${_ropts_initdone}" ]; then echo -n "Additional $1 routing options:" _ropts_initdone=yes fi } _check_dynamicrouting() { local skip file name rcvar # copied from /etc/rc skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" fi [ -n "$local_startup" ] && find_local_scripts_new for file in $( rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null | xargs grep -lE '^# PROVIDE:.*\<dynamicrouting\>' ); do (set -- enabled; . $file) && return 0; done return 1 } options_inet() { local _icmp_drop_redirect _ropts_initdone= if checkyesno icmp_bmcastecho; then ropts_init inet echo -n ' broadcast ping responses=YES' ${SYSCTL} net.inet.icmp.bmcastecho=1 > /dev/null else ${SYSCTL} net.inet.icmp.bmcastecho=0 > /dev/null fi _icmp_drop_redirect="${icmp_drop_redirect}" case "${_icmp_drop_redirect}" in [Aa][Uu][Tt][Oo] | "") if _check_dynamicrouting; then _icmp_drop_redirect="yes" else _icmp_drop_redirect="no" fi ;; esac if checkyesno _icmp_drop_redirect; then ropts_init inet echo -n ' ignore ICMP redirect=YES' ${SYSCTL} net.inet.icmp.drop_redirect=1 > /dev/null else ${SYSCTL} net.inet.icmp.drop_redirect=0 > /dev/null fi if checkyesno icmp_log_redirect; then ropts_init inet echo -n ' log ICMP redirect=YES' ${SYSCTL} net.inet.icmp.log_redirect=1 > /dev/null else ${SYSCTL} net.inet.icmp.log_redirect=0 > /dev/null fi if checkyesno gateway_enable; then ropts_init inet echo -n ' gateway=YES' ${SYSCTL} net.inet.ip.forwarding=1 > /dev/null else ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null fi if checkyesno forward_sourceroute; then ropts_init inet echo -n ' do source routing=YES' ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null else ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null fi if checkyesno accept_sourceroute; then ropts_init inet echo -n ' accept source routing=YES' ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null else ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null fi if checkyesno arpproxy_all; then ropts_init inet echo -n ' ARP proxyall=YES' ${SYSCTL} net.link.ether.inet.proxyall=1 > /dev/null else ${SYSCTL} net.link.ether.inet.proxyall=0 > /dev/null fi [ -n "${_ropts_initdone}" ] && echo '.' } options_inet6() { _ropts_initdone= if checkyesno ipv6_gateway_enable; then ropts_init inet6 echo -n ' gateway=YES' ${SYSCTL} net.inet6.ip6.forwarding=1 > /dev/null else ${SYSCTL} net.inet6.ip6.forwarding=0 > /dev/null fi [ -n "${_ropts_initdone}" ] && echo '.' } load_rc_config $name run_rc_command "$@"
Upload File
Create Folder