Commit Graph

261 Commits

Author SHA1 Message Date
Brooks Davis
7657f59596 - Remove the pccard_ifconfig variable in favor of a new
ifconfig_DEFAULT variable.  Unlike pccard_ifconfig, ifconfig_DEFAULT
   applies to all interfaces that do not specify an ifconfig_<ifn>
   variable rather than just those listed in removable_interfaces.
 - Correct the list of interfaces when network_interfaces and
   removable_interfaces are both set by including removable_interfaces
   in the list of canidates.
 - When listing dhcp interfaces, include those with other ifconfig
   options so nat works.

Approved by:	re (network interface startup blanket)
2005-06-30 05:02:34 +00:00
Brooks Davis
a7e55c1e77 Add support for starting wpa_supplicant by adding the WPA keyword to an
interface's ifconfig_<ifn> entry in /etc/rc.conf.

Approved by:	re (network interface startup blanket)
2005-06-30 04:52:47 +00:00
Brooks Davis
cbac4adce6 Fix return values of ifconfig_up/down.
Reported by:	Andrea Campi
2005-06-07 23:59:45 +00:00
Brooks Davis
8e9e71f817 Support code for the OpenBSD dhclient. This significantly changes the
way interfaces are configured.  Some key points:

  - At startup, all interfaces are configured through /etc/rc.d/netif.
  - ifconfig_<if> variables my now mix real ifconfig commands the with
    DHCP and WPA directives.  For example, this allows media
    configuration prior to running dhclient.
  - /etc/rc.d/dhclient is not run at startup except by netif to start
    dhclient on specific interfaces.
  - /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of
    it's work.
  - /etc/pccard_ether no longer takes additional arguments to pass to
    ifconfig.  Instead, ifconfig_<if> variables are now honored in favor
    of pccard_ifconfig when available.
  - /etc/pccard_ether will only run on interfaces specified in
    removable_interfaces, even if pccard_ifconfig is set.
2005-06-07 04:49:12 +00:00
Pawel Jakub Dawidek
bb28d112bb 'all' argument for list_net_interfaces() is now unused, remove it. 2004-12-05 21:45:36 +00:00
Ralf S. Engelschall
18c3f40e94 Use "ifconfig -l" instead of "list_network_interfaces all" in
ifnet_rename() to support situations where rc.conf's $network_interfaces
variable is set to an explicit list of network interfaces (instead of
the default "auto").

Using "list_network_interfaces all" resulted in using
$network_interfaces for both interface _renaming_ and interface
_configuration_ which obviously cannot work either before (if the
new name is in $network_interfaces) or after (if the old name is in
$network_interfaces) renaming the interface.
2004-12-05 09:51:48 +00:00
Ralf S. Engelschall
9edbeba781 fix typo: s/intefraces/interfaces/ 2004-12-05 09:01:20 +00:00
Pawel Jakub Dawidek
1f8197cf4d Allow to change interfaces name on boot time.
Now, one should be able to put something like this into /etc/rc.conf:

	ifconfig_fxp0_name="net0"
	ifconfig_net0="inet 10.0.0.1/16"

Reviewed by:	green
2004-10-30 13:44:06 +00:00
Yaroslav Tykhiy
cd9d7d4d0c Avoid double appearing of cloned interfaces in the output
from list_net_interfaces() when network_interfaces=auto.

Rationale: Since the auto case is special, the lesser evil
had to be chosen among not adding cloned interfaces to
_tmplist or removing duplicates from _tmplist after adding
cloned interfaces.  Since list_net_interfaces() must not use
/usr/bin tools, the former "evil" appeared clearer and much
more efficient.  (See the PR audit trail for discussion.)

PR:		conf/63700
Reviewed by:	brooks
MFC after:	5 days
2004-08-28 07:58:02 +00:00
Yaroslav Tykhiy
044d85099a Fix a typo in a variable name. 2004-08-27 12:11:47 +00:00
Jens Schweikhardt
d8beb0fd3b Removed whitespace at BOF, EOL & EOF. 2004-06-06 11:46:29 +00:00
Martin Blapp
d10526a03b Improve the handling dhcp handling of pccard_ether.
There are now many configurations which have a NIC on board, and
pccard slots. If a dhclient is running on the internal nic, the
Improve the handling dhcp handling of pccard_ether.

Improve the dhcp handling of pccard_ether.

There are now many configurations which have a NIC on board and
Improve the dhcp handling of pccard_ether.

There are now many configurations which have a NIC on board and
cardbus slots too. If a dhclient was already running on the internal
NIC, the user was forced to kill a running dhclient manually.

If now a pccard is included at startup time, /etc/rc.d/dhclient
start does include it into the startup list for dhcp devices.
That means you can now do dhcp on the internal and the pccard devices
at the same time. If the card is plugged in later, a running dhclient
(working for the internal interface only) is killed, and restarted,
but the interface name of the new pccard is added to the internal
name. After removal, /etc/rc.d/dhclient is started again. This
script does nothing if there are no devices in /etc/rc.conf

This is only a workaround for a well known problem. After we have
a dhcp client which handles device adding and removal, it will go
away.
2003-08-11 20:32:00 +00:00
Hajimu UMEMOTO
c8d9e00aca add rtsol_flags.
MFC after:	1 week
2003-08-08 17:43:58 +00:00
Jun Kuriyama
7e025e0506 Check by [ $? -eq 0 ] rather than $?.
Reviewed by:	mtm
2003-06-24 03:55:21 +00:00
Mike Makonnen
b981655c08 o Fix a typo
o Fill in the ipx_down() routine.

Submitted by: ceri
2003-06-09 17:34:31 +00:00
Mike Makonnen
991ce918f2 - Remove a debugging echo.
- When we change the IFS make sure to return it to its previous
  value before executing a command.
2003-06-08 11:49:30 +00:00
Mike Makonnen
8ee6ed40d1 Implement *_down network routines for ifconfig'ed interfaces, cloned
interfaces, interface aliases, user supplied ifconfig scripts, and
ipx interfaces. The ipx routine fails unconditionaly at the moment.
Someone who has a need for it can fill it in with the appropriate incantations.
2003-06-08 10:34:40 +00:00
Hajimu UMEMOTO
bcd1e80f87 pccard_ether didn't setup IPv6 after rcTOS sweep.
Reviewed by:	mtm and dougb
Approved by:	re (scott)
2003-05-12 11:36:50 +00:00
Mike Makonnen
8b3695ab45 Break out and rewrite the network setup scripts.
o /etc/network.subr contains common subroutines used for seting
	  up network interfaces
	o rc.d/hostname sets the hostname if not already set
	o rc.d/nisdomain sets the nis domain *after* rpcbind but
	  before the yp* daemons. This fixes issues with temporary
	  hangs when looking up informaion in nis before it's ready.
	o rc.d/netif brings network interfaces (minus dhcp)  up.
	o rc.d/network1 has been disabled and will be retired before
	  RELENG_5. It will be replaced by rc.d/netif

Approved by:	markm (mentor)
2003-04-18 17:51:54 +00:00
Warner Losh
c42073b2d4 Back out 1.143 and 1.144. They are no longer needed now that we start
devd later in the boot process.  This should fix all the problems
people have had with those commits.  Diskless should be working again,
and those that mount /usr with nfs should be able to do that again too.
2003-02-12 04:26:10 +00:00
Warner Losh
96ac3c4b16 o Don't consider LOOPBACK devices as configured... 2002-12-13 23:36:31 +00:00
Warner Losh
c9e1bbfb91 o redirect the grep to /dev/null
o use ifn rather than interface in rc.network
o merge into rc.d/network1

Approved by: (re blanket)
2002-12-12 09:31:10 +00:00
Jens Schweikhardt
143085107b Fix style bugs:
* Space -> tabs conversion.
* Removed blanks before semicolon in "if ... ; then".
* Proper indentation of misindented lines.
* Put a full stop after some comments.
* Removed whitespace at end of line.

Approved by:	silence from gordon
2002-10-12 10:31:31 +00:00
Hajimu UMEMOTO
a75d520e1f up gif during setup. 2002-09-20 18:31:55 +00:00
Gordon Tetlow
e4bc448975 Correct comment
Submitted by:	Mike Makonnen <makonnen@pacbell.net>
2002-08-09 17:33:07 +00:00
Dima Dorfman
dacf6a1e22 Remove spurious "echo '.'". 2002-07-18 05:00:23 +00:00
Doug Barton
de66529e70 Make nisdomainname=NO DTRT
Submitted by:   des, via Mike Makonnen <makonnen@pacbell.net>
2002-07-18 05:00:20 +00:00
Doug Barton
4264c30c0d Cleanup some pollution from the NetBSD sync, and add gif setup.
Submitted by:   Mike Makonnen <makonnen@pacbell.net>
2002-07-18 05:00:19 +00:00
Gordon Tetlow
8abdee58c7 Fix a typo that caused dhclient not to work.
Submitted by:   Dennis Kristensen <snicki@snicki.dk>
Reviewed by:    Mike Makonnen <makonnen@pacbell.net>
2002-07-18 05:00:18 +00:00
Gordon Tetlow
242bd45fb4 Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by:   Mike Makonnen <makonnen@pacbell.net>
Reviewed by:    silence on -current and -hackers
Prodded by:     rwatson
2002-07-18 05:00:17 +00:00
Dag-Erling Smørgrav
cec161f9e1 Cosmetic changes to the previous commit, bringing it closer to what I
already had in my tree but didn't want to commit.
2002-04-11 22:06:27 +00:00
Peter Wemm
6636027fe4 Since sshd expects /etc/ssh/ssh_host_rsa_key to exist, we had better
create it.  Also specify protocol v1/v2 in case people wonder why we
generate two RSA keys.
2002-04-10 22:30:54 +00:00
Doug Barton
41cf829909 The good news is that my initial PR was correct... the bad news is that I
was apparently smoking something when I committed the last fix, because as
ume was kindly enough to set me straight on, amd *will* start with no
arguments at all, as long as there is an /etc/amd.conf file for it to
read. What it won't do is start with *just* -p.

In any case, now it's fixed.
2002-04-01 18:33:45 +00:00
Dag-Erling Smørgrav
dde1888c4a Don't try to generate ssh keys if ssh isn't installed. 2002-03-19 03:45:02 +00:00
Crist J. Clark
5b7e37d2b7 IPFilter may need to be re-sync'ed even if we are not filtering, but
only doing ipnat(8). Go back to using $ipfilter_active, but turn off
$ipfilter_active when loading ipl.ko has failed.

Submitted by:	devet@devet.org (Arjan de Vet)
MFC after:	3 days
2002-03-19 01:56:04 +00:00
Doug Barton
4072b4a6a1 Answer the question posed in 1.126. amd won't start without either a
conf file, or command line options. I brought this up in PR 12432,
which (ironically) obrien assigned to me after I became a committer. :)

PR:		conf/12432
Submitted by:	Me
2002-03-17 07:35:51 +00:00
Crist J. Clark
7a82d7421f The reload of ipf(8) rules should depend on $ipfilter_enable, not
$ipfilter_active. $ipfilter_enable is set to "NO" if modules fail to
load, and $ipfilter_active can be "YES" when we are not using ipf(8).

MFC after:	3 days
2002-03-12 20:25:25 +00:00
David E. O'Brien
3cbb824a64 Background the startup of `Amd', it often blocks on startup. 2002-03-12 01:04:35 +00:00
David E. O'Brien
ec6a10cd53 Why shouldn't amd always write its PID to a file?
Since I cannot answer that question, make it.
2002-03-12 01:01:53 +00:00
Dima Dorfman
1998c28f48 Redirect stdout of `ipf -y' to /dev/null. This removes a stray
"filter sync'd" in the middle of the boot output if IPFilter is
enabled, but does not hide any potential errors, which go to stderr.
2002-03-04 10:30:24 +00:00
Crist J. Clark
29c0f078e2 There is no reason to demand the administrator set 'natd_interface'
when running natd(8) out of the rc-files. It is perfectly valid for
the interface or alias address to be set in a natd(8) configuration
file, not on the command line. Also, loosen up the restrictions on
identifying an IP address argument in 'natd_interface.'

Fix the documentation, rc.conf(5), to reflect this change.

Take the bogus default for 'natd_interface' out of /etc/defaults/rc.conf.

MFC after:	3 days
2002-02-20 10:31:01 +00:00
Crist J. Clark
36a48df48e peter points out that we probably should not mess with the sysctl(8)
values at all if they are not purposefully set. What if the
administrator messed with them in /etc/sysctl.conf? We don't want to
overwrite them.

If 'log_in_vain' is zero, do not force the issue. If it is non-zero,
set it.
2002-02-08 13:25:33 +00:00
Sheldon Hearn
3e38757beb Register amd's dependency on NFS.
This change was submitted to the freebsd-audit mailing list for review
but received no feedback.  Hindsight-enabled reviews are welcome.

PR:		conf/31358
Submitted:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2002-01-28 11:05:01 +00:00
Crist J. Clark
f44609fe71 Make the rc.conf(5) 'log_in_vain' knob an integer.
Try this out in -CURRENT, MFC, and then consider dropping the
'log_in_vain' knob all together. It really is something for
sysctl.conf(5).

PR:		bin/32953
Reviewed by:	-bugs discussion
MFC after:	1 week
2002-01-26 09:05:13 +00:00
Alfred Perlstein
bcb733d069 rpc.lockd needs rpc.statd to be running for it to start up properly.
so swap the order.

Also allow rpc.lockd and rpc.statd to be turned on if nfsclient is
enabled.  They are needed to provide client side locking support.

PR: conf/27811
2001-12-13 04:21:18 +00:00
Ruslan Ermilov
d4d2e898a1 s/sysctl -w/sysctl/ 2001-12-11 08:21:46 +00:00
Robert Watson
67b86547da o Update rc.network to reflect the recent change of default in the
kernel TCP timer code: rather than checking for tcp_keepalive being
  set to "YES", check for "NO" and turn off keepalives if the variable
  is set in that manner.

o Note: eventually, it would make sense to remove this variable from
  rc.conf management, and instead rely on sysctl.conf.  In fact, this
  is probably true of a number of rc.conf variables whose sole aim
  is to drive the setting of sysctls at boot time.
2001-12-07 17:03:14 +00:00
Crist J. Clark
68f1d5a354 Protect the '*' in pppoed_provider (the default) from metacharacter
expansion in the rc-scripts.

PR:		32552
Submitted by:	Gleb Smirnoff <glebius@rinet.ru>
Approved by:	ru
Obtained from:	ru
MFC after:	1 day
2001-12-06 09:34:44 +00:00
Dima Dorfman
a48060a2f7 Spelling police: sucessful -> successful. 2001-11-24 23:41:32 +00:00
Darren Reed
c05c122c97 Resolve all the ipfilter startup issues in rc.network with one big patch
to get it all right, allowing ipnat to be enabled independantly of ipfilter
in rc.conf (among other things).

PR:		multiple
Submitted by:	Arjan de Vet <devet@devet.org>
Reviewed by:	Giorgos Keramidas <keramida@FreeBSD.org>
2001-11-24 13:48:30 +00:00
Sheldon Hearn
ce76d9c108 Avoid unnecessary calls to expr(1) by using standard shell arithmetic
expansion instead.
2001-11-14 06:35:43 +00:00
Bill Fenner
85c9d676b5 Update the nsswitch.conf -> host.conf generator to handle criteria,
continuation lines, extra whitespace, and to use the last matching
 line in the file.  This syncs the host.conf generation with how
 the nsswitch.conf is parsed.
Only print " host.conf" instead of a multi-line message, since this
 happens on every boot.
2001-11-07 00:33:56 +00:00
Dag-Erling Smørgrav
bd0a2a3f93 Modify the way host.conf and nsswitch.conf are treated at boot time:
- if nsswitch.conf exists, host.conf is auto-generated for compatibility
   with legacy applications and libraries.

 - if host.conf exists but nsswitch.conf does not, nsswitch.conf is auto-
   generated as usual.
2001-11-01 12:39:01 +00:00
Darren Reed
f645349388 Do an ipf -y after bringing up ppp to ensure rules which mention ppp get
matched.  Moification on PR to handle ipnat not being dependant on
ipfilter_enable

PR:	22859
2001-10-20 04:46:32 +00:00
Darren Reed
9645656d2c Allow ipnat_enable to be set to "yes" without requiring ipfiltre_enable to
be set to "yes"

PR:		25223
2001-10-20 04:41:47 +00:00
Darren Reed
639e6db6e7 Put in place for using ipfs use on shutdown and startup.
PR:		27070
2001-10-20 04:33:02 +00:00
Doug Barton
74e07b9e48 Handle the lack of nfs server or client support in the kernel by
kldload'ing the appropriate modules before enabling the service.
2001-10-19 06:50:52 +00:00
John Baldwin
19d1491b60 Remove references to nfsiod and nfs_client_flags now that they are
obsolete.

Submitted by:	Gordon Tetlow <gordont@gnf.org>
2001-10-10 20:36:51 +00:00
Brooks Davis
40995998c5 Add a new rc.conf variable, cloned_interfaces, to create cloned
interfaces at boot.
2001-09-19 21:27:27 +00:00
Peter Wemm
06fec2cf89 The vfs.nfs.bufpackets sysctl is in the client, not the server. Move it
to the client section.  Turn off nfsiod, it no longer exists (now just
kthreads).  I need revisit nfsiod so that we have an argument passthrough.
2001-09-19 00:22:26 +00:00
Darren Reed
e58f466620 Merge in patch to automagically decide whether or not a kldload of ipfilter
is required into rc.network.

Person failed to use a real name so both email addresses from PR included
(Sent was different to From).

PR:		22998
Submitted by:	dl@leo.org/spock@empire.trek.org
2001-07-30 23:12:02 +00:00
Mark Murray
e7f2f42f1b Upgraded launchpad for kerberos. Noe kerberos IV OR kerberos 5
may be started at boot for kerberos servers.
2001-07-28 19:57:57 +00:00
Brooks Davis
cdb5d37b3e Create gif devices in the "gifconfig" stage while configuring them.
Reviewed by:	ru, ume
Obtained from:	NetBSD
MFC after:	1 week
2001-07-02 21:08:48 +00:00
Jens Schweikhardt
03f80507e5 Fix misindented esac.
MFC after:	1 week
2001-06-16 15:48:43 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Brian Somers
4524e002f7 Add a missing \n
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
PR:		28014
MFC after:	1 week
2001-06-10 16:21:56 +00:00
Brian Somers
c34b6be0cd Move gif_interfaces from an IP6 option to a regular IP option.
PR:		26543
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
MFC after:	3 weeks
2001-06-03 12:26:56 +00:00
David E. O'Brien
d3ebe37cd0 Restore the RSA host key to /etc/ssh/ssh_host_key.
Also fix $FreeBSD$ spamage in crypto/openssh/sshd_config rev. 1.16.
2001-05-18 18:10:02 +00:00
Jesper Skriver
b10cf90768 Link /etc/ssh/ssh_host_key to /etc/ssh/ssh_host_rsa_key to deal with
gratutious changes in the latest SSH

Reviewed by:	obrien
Approved by:	obrien
2001-05-16 19:23:54 +00:00
Peter Wemm
b7c90f028d s/ssh_host_key/ssh_host_rsa_key/ since that is what openssh uses now
after a mergemaster.
2001-05-09 07:46:44 +00:00
Dag-Erling Smørgrav
cc084f7587 Axe TCP_RESTRICT_RST. It was never a particularly good idea except for a few
very specific scenarios, and now that we have had net.inet.tcp.blackhole for
quite some time there is really no reason to use it any more.

(second of three commits)
2001-03-19 22:07:32 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Doug Barton
8f38f3b2e6 * Add an eval so that ipnat_flags=">/dev/null" works, per the PR
* Do some line length and specify full path cleanups while I'm here

PR:				conf/22937
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-12-17 22:14:49 +00:00
Doug Barton
e14563a3f3 Apply a more consistent style to the echo statements in /etc/ scripts.
* Put quotes around each line
* Single quotes for lines with no variable interpolation
* Double quotes if there is
* Capitalize each word that begins a line
* Make echo -n 'Doing foo:' ... echo '.' more of a standard

No functionality changes
2000-12-17 08:16:06 +00:00
Ruslan Ermilov
35c8e6411c Fixed the reporting of ip_portrange_{first|last}. 2000-10-12 11:25:57 +00:00
David E. O'Brien
a1c43e3fbb Add copyright notices. Other systems have been barrowing our /etc files
w/o giving any credit.
2000-10-08 19:20:36 +00:00
Darren Reed
7a76642f3c This brings support for IP Filter into rc.network and rc.conf with
the appropriate documentation added to rc.conf(5).  If all goes well
with this over the next few weeks, the PR will be closed with the
pullup of patches back to 4-STABLE.

PR:		20202
Submitted by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
Reviewed by:	Darren Reed <darrenr@freebsd.org>
Approved by:	Darren Reed <darrenr@freebsd.org>
Obtained from:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
2000-10-06 12:24:45 +00:00
Brian Somers
cd63d8618f Use su -m instead of just su to avoid reading the users login profile 2000-09-28 05:43:44 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
John Baldwin
bc19d0871a Fix a whitespace bogon. 2000-08-16 23:08:28 +00:00
Brian Somers
e2323071e6 Allow a ppp_user specification to run ppp at startup
PR:		20258
2000-08-10 00:13:02 +00:00
Neil Blakey-Milner
e3186dd555 Add to, don't overwrite, user-settable mountd_flags.
PR:		conf/15745
Submitted by:	Vivek Khera <khera@kciLink.com>
2000-07-14 13:03:36 +00:00
Matthew Dillon
55f087be8e Add ip_portrange_first and ip_portrange_last rc.conf/rc.network
options.  This allows you to set the standard dynamic port
    assignment range prior to any network daemons (like named) starting
    up, necessary if you are also using a firewall to restrict lower ports.
    will be MFC'd in a few days
2000-06-22 17:40:53 +00:00
Matthew Dillon
ba3ed2268c Add ipsec_enable and ipsec_file options to run IPSEC's setkey program
with the specified configuration file at the appropriate time.
2000-05-16 06:52:11 +00:00
Kris Kennaway
87f3ab91b3 Remove extraneous ";;" in previous commit
Submitted by:	jedgar
2000-05-15 19:56:59 +00:00
Kris Kennaway
0c11f6e187 Create a DSA host key if one does not already exist, and teach sshd_config
about it.
2000-05-15 05:40:27 +00:00
Andrey A. Chernov
be08c4bfc8 Add firewall_logging knob to enable/disablle events logging, disabled
by default. Needed mainly for ipfw kernel module to enable logging
disabled there.
2000-05-06 17:18:19 +00:00
Matthew Dillon
8d1b3828fa Add a sysctl to specify the amount of UDP receive space NFS should
reserve, in maximal NFS packets.  Originally only 2 packets worth of
    space was reserved.  The default is now 4, which appears to greatly
    improve performance for slow to mid-speed machines on gigabit networks.

    Add documentation and correct some prior documentation.

Problem Researched by: Andrew Gallatin <gallatin@cs.duke.edu>
Approved by: jkh
2000-03-27 21:38:35 +00:00
Jordan K. Hubbard
12324b777c cosmetic fix - add a space. 2000-02-29 12:53:28 +00:00
Mark Murray
20fb384ee0 Get the order of things right; the keys need to be generated
early to allow entropy to replenish.
sshd must start late to catch the full effects of ldconfig.
2000-02-28 19:54:06 +00:00
Jordan K. Hubbard
49923df12d Generate new sshd host key when necessary. I'm tired of
waiting for someone to commit this. :)
2000-02-28 19:21:05 +00:00
Mark Murray
93e3e5e9e3 Run sshd at boot time if the sysadmin wants it. Also install
ssh[d] config files in the right place.
2000-02-24 23:12:04 +00:00
Hellmuth Michaelis
6945eda6ea Approved by: jkh
Reviewed by: joerg

The isdnd is able to listen on a socket for isdnmonitor to connect to
it to remotely control it (similar to ppp and pppctl). When this is
enabled in the isdnd config file, it will fail currently because isdnd
is started before the network interfaces are configured.
It is necessary to move the isdnd start after the ifconfig of the network
interfaces, then this problem will not occur.
2000-02-06 16:33:54 +00:00
Brian Feldman
ab80d6fabc This is another in Martin Blapp's N-series of mount-related cleanups :)
Changes are:
 - rpc.umntall is called at the right places now in /etc/rc*
 - rpc.umntall timeout has been lowered from two days (too high) to one
 - verbose messages in rpc.umntall have been clarified
 - kill double entries in /var/db/mounttab when rpc.umntall is invoked
 - ${early_nfs_mounts} has been removed from /etc/rc
 - patched mount(8) -p to print different pass/dump values for ufs filesystems.
   (last patch recieved from dan <bugg@bugg.strangled.net>)

Submitted by:	Martin Blapp <mbr@imp.ch>, dan <bugg@bugg.strangled.net>
2000-01-15 14:28:14 +00:00
Ollivier Robert
83a8718b84 xntpd -> ntpd.
Submitted by:	ru
1999-12-17 13:36:40 +00:00
David E. O'Brien
278bd49cc8 Suport multiple ``ifconfig_*?="DHCP"'' configurations.
Currently we have a problem in that `dhclient' bails when configuring the
second interface as port 68 is already in use (by the `dhclient' started
for the first interface).

PR:		14810
Submitted by:	n_hibma
1999-12-12 01:58:30 +00:00
Brian Somers
2d904a8ba9 Oops, typo 1999-11-23 00:26:03 +00:00
Brian Somers
6c62fd3e55 Add pppoed startup options 1999-11-23 00:22:25 +00:00
Andrey A. Chernov
08221ae7d5 Add network pass4 - after all local (/usr/local/etc/rc.d f.e.)
daemons started. Move log_in_vain option there. It is needed to avoid
lot of connections to port 80 logged on production WWW server prior
Apache started from /usr/local/etc/rc.d
1999-11-17 22:38:02 +00:00
Andrey A. Chernov
319f15a262 Add single_mountd_enable hook to run mountd but not NFS server
Needed for machine with CFS but without real NFS
1999-11-14 21:28:13 +00:00
Brian Feldman
eb0519dbda Make the firewall file variable space-safe. 1999-09-19 21:32:42 +00:00
Sheldon Hearn
321704296f Apply a consistent style to most of the etc scripts. Particularly, use
case instead of test where appropriate, since case allows case is a sh
builtin and (as a side-effect) allows case-insensitivity.

Changes discussed on freebsd-hackers.

Submitted by:	Doug Barton <Doug@gorean.org>
1999-09-13 15:44:20 +00:00
Dag-Erling Smørgrav
e46cd3d4d2 Add the net.inet.tcp.restrict_rst and net.inet.tcp.drop_synfin sysctl
variables, conditional on the TCP_RESTRICT_RST and TCP_DROP_SYNFIN kernel
options, respectively. See the comments in LINT for details.
1999-09-12 17:22:08 +00:00
Peter Wemm
805e4f2d64 -background is also a legitimate ppp mode. Don't change it to -auto. 1999-09-01 08:57:01 +00:00
Peter Wemm
9b7a44a60e $Id$ -> $FreeBSD$ 1999-08-27 23:37:10 +00:00
Jordan K. Hubbard
50b14091b7 Catch an extra X on DHCP.
Spotted by the eagle eyes of:	Pierre DAVID <Pierre.David@prism.uvsq.fr>
1999-08-27 22:15:15 +00:00
Sheldon Hearn
b68adff6b7 Style clean-up:
* All variables are now embraced: ${foo}

	* All comparisons against some value now take the form:
	  [ "${foo}" ? "value" ]
	  where ? is a comparison operator

	* All empty string tests now take the form:
	  [ -z "${foo}" ]

	* All non-empty string tests now take the form:
	  [ -n "${foo}" ]

Submitted by:	jkh
1999-08-25 16:01:45 +00:00
Brian Somers
cdd53d9ce9 ppp_alias -> ppp_nat
Submitted by: Josef L. Karthauser <joe@FreeBSD.org.uk>
1999-08-22 23:26:05 +00:00
Brian Somers
b6bc698bc1 Quieten ppp at startup. 1999-08-19 21:15:16 +00:00
Dag-Erling Smørgrav
18d3153ead Add net.inet.icmp.log_redirect and net.inet.icmp.drop_redirect, for
respectively logging and dropping ICMP REDIRECT packets.

Note that there is no rate limiting on the log messages, so log_redirect
should be used with caution (preferrably only for debugging purposes).
1999-08-10 09:45:33 +00:00
Brian Somers
73fac075b2 Start ppp before natd, not afterwards.
Submitted by: Josef L. Karthauser <joe@uk.FreeBSD.org>
1999-07-26 15:17:23 +00:00
Brian Somers
51f80ae148 Add a default ppp.conf (mode 600).
Originally submitted by: Wayne Self <wself@cdrom.com>

Allow a ppp startup option in rc.conf.

Adjust sysinstall so that it appends to the end of ppp.conf
and uses the generated profile to start ppp in auto mode on
boot.

Submitted by: Josef L. Karthauser <joe@uk.FreeBSD.org>
1999-07-26 10:49:37 +00:00
Jordan K. Hubbard
e98e9050af Allow DHCP to be used in an ifconfig variable instead of the usual
address information, producing the obvious effect (dhcp configuration).

Submitted by:   "Sean O'Connell" <sean@stat.Duke.EDU>
1999-07-16 09:26:53 +00:00
Peter Wemm
d45821b19b Tweak previous commit. Only sense the configuration if network_interfaces
is set to "auto".  Any network_interfaces settings will be treated as
before.
1999-07-08 18:56:04 +00:00
Peter Wemm
9c65a84aea Do away with ${network_interfaces} in rc.conf. Just use ifconfig -l to
get a list of interfaces, and then automatically configure them if
${ifconfig_${ifn}} or /etc/start_if.${ifn} exists.

This makes it a lot easier to deal with machines that constantly change
their network configuration as you can leave ifconfig settings for all
the possible cards - just the ones that are present will be configured.
1999-07-07 12:49:47 +00:00
Brian Somers
b25d26374e If amd_flags is empty, don't add -p as it makes amd abend. 1999-06-08 13:00:30 +00:00
Bruce Evans
7389b9fd55 Don't discard error output from sysctl(8).
Do discard standard output from the sysctl for approxy_all, and echo
what this sysctl is doing in the usual way.  This fix is probably
backwards.  We should probably just use the standard sysctl output
in all cases (it needs to have a newline filtered out).

Echo what the sysctls for nfs_reserved_port_only and nfs_access_cache
are doing.
1999-06-05 12:06:19 +00:00
Poul-Henning Kamp
2c7b227278 Add handle to control global TCP keepalives and turn them on as
default.

Despite their name it doesn't keep TCP sessions alive, it kills
them if the other end has gone AWOL.  This happens a lot with
clients which use NAT, dynamic IP assignment or which has a 2^32
* 10^-3 seconds upper bound on their uptime.

There is no detectable increase in network trafic because of this:
two minimal TCP packets every two hours for a live TCP connection.

Many servers already enable keepalives themselves.

The host requirements RFC is 10 years old, and doesn't know about
the loosing clients of todays InterNet.
1999-06-05 05:45:57 +00:00
Brian Somers
b9a5e41806 Remove extraneous space
PR:		11096
1999-04-12 15:26:41 +00:00
Dag-Erling Smørgrav
3e297f8d95 Allow the user to specify a different firewall script than /etc/rc.firewall. 1999-04-10 10:56:58 +00:00
Warner Losh
a780977066 Add two features:
log_in_vain:
	log_in_vain turns on logging for packets to ports for which
	there is no listener.
    rc.sysctl:
	A generic way to set sysctl values.  It reads /etc/syslog.conf
	and sets values based on that.  No /etc/syslog.conf has been
	checked in yet, and I've not added this to the makefile yet
	until I get more feedback.

Reviewed by: -current, -hackers and bde especially
1999-03-28 20:36:03 +00:00
Brian Somers
cff5e07509 Move natd from network_pass3 to network_pass1 1999-03-24 10:28:49 +00:00
James FitzGibbon
1dd418124c Add ${lpd_program} and ${portmap_program} as variables in rc.conf, with
suitable defaults pointing to the FreeBSD-shipped versions.  This will allow
for easier integration of third-party replacements for these daemons.
Reviewed by: Several members of -committers
1999-03-11 16:17:24 +00:00
Joerg Wunsch
8a173970c1 Add some special hooks for sppp(4) interfaces. In addition to the
normal ifconfig stuff, one might need to pass down authentication
parameters for them.

This is closely tied to Hellmuth's impending rc patches for ISDN, but
sppp can also be used separately (thus it doesn't go directly into the
planned ISDN section of rc.conf).

Reviewed by:	hm
1999-01-13 17:32:37 +00:00
Hellmuth Michaelis
49c3b47aae Integrate the ISDN subsystem into the /etc/rc framework
Reviewed by: Joerg Wunsch
1999-01-13 08:20:55 +00:00
Jordan K. Hubbard
539fb1799a Allow rwhod to take flags.
PR:		7705
Submitted by:	Johan Karlsson <k@numeri.campus.luth.se>
1999-01-03 22:19:23 +00:00
Joseph Koshy
8dbc5051b3 Direct std{err,out} to /dev/null when invoking sysctl(8) for setting
`nfs_access_cache_timeout'.

Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
1998-11-27 07:06:11 +00:00
Mike Smith
cda43ef612 Implement the nfs_access_cache variable, allowing us to set the timeout for
the NFS client's ACCESS cache.
1998-11-15 20:30:04 +00:00
Peter Wemm
2bfb2faded kldload ipfw, it's installed always and works on both kernel formats 1998-11-11 05:23:44 +00:00
Poul-Henning Kamp
7d5c779c86 Here are some scripts and man pages for configuring HARP ATM
interfaces.

Reviewed by:	phk
Submitted by:	Mike Spengler <mks@networkcs.com>
1998-10-06 19:24:31 +00:00
Martin Cracauer
47aabea273 rc.conf variable $amd_map_program needs to be eval'ed.
PR:		misc/7435
Submitted by:	David Wolfskill <dhw@whistle.com>
1998-09-16 20:38:23 +00:00
Joseph Koshy
61a4defd54 Turn off replies to ICMP echo requests for broadcast and multicast
addresses by default.

Add a knob "icmp_bmcastecho" to "rc.network" to allow this
behaviour to be controlled from "rc.conf".

Document the controlling sysctl variable "net.inet.icmp.bmcastecho"
in sysctl(3).

Reviewed by: dg, jkh
Reminded on -hackers by: Steinar Haug <sthaug@nethelp.no>
1998-09-15 10:49:03 +00:00
Poul-Henning Kamp
e5d237d4b9 tcp_extensions now only applies to RFC1323 1998-09-06 08:20:11 +00:00
Poul-Henning Kamp
a6587b5772 In /etc/rc.network, near line 242, setting up Kerberos,
variable "stash_flag" is set.  A few lines later, it is evaluated
as "stash_flags" with a trailing "s", and then a bit later the
singular version is unset.

PR:		7609
Reviewed by:	phk
Submitted by:	Walt Howard <howard@ee.utah.edu>
1998-08-14 06:55:17 +00:00
Jacques Vidrine
e4e737cd85 Allow either an IP address or an interface to be specified in
the rc.conf variable ``natd_interface''.  rc.network will
determine whether it is an IP address or an interface name,
and invoke natd with the -a or -n flag as appropriate.

PR:				6947
Reviewed by:	jkh@FreeBSD.ORG
1998-07-08 15:40:53 +00:00
Steve Price
a164ecc61b Cleanup natd startup test.
PR:		6946
Submitted by:	Jacques Vidrine <n@nectar.com>
1998-06-14 16:31:03 +00:00
Jordan K. Hubbard
80b41362fb cosmetic: clean up startup messages and rearrange some options
to go in a more proper order.
1998-05-19 04:36:31 +00:00
Andreas Klemm
90f94d55c1 Overlooked, that newer naming convention is xxx_program instead of xxx_prog.
So changed it to ntpdate_program and xntpd_program.
Backout last change, now we have again named_program, sorry.
1998-05-06 17:36:16 +00:00
Andreas Klemm
a8f00855a1 Add variables for the ntpdate and xntpd program, you might want
to run the binaries from the new ntp v4 port.
1998-05-05 21:14:27 +00:00
Poul-Henning Kamp
4cb3dec38f Jean-Simon Pendry's paper on amd refers to the use of "ypcat -k"
against the "master map" to get the list of mount point/amd map
correspondences, and using that list as command-line arguments to start
amd.

When I tried to do this with the existing /etc/rc* scripts, I found that
I couldn't do this by modifying only /etc/rc.conf:  that file gets
sourced very early by /etc/rc, well before any networking functionality
is present, let alone NIS.  Further, I wasn't able to figure out a way
to use various levels & types of quoting to defer evaluation of the
string to a point subsequent to NIS initialization.

As a result, I resorted to hacking /etc/rc.network -- but I did it in a
way that ought to be reasonably general, and avoid breakage for anyone
else.

PR:		6387
Reviewed by:	phk
Submitted by:	David Wolfskill <dhw@whistle.com>
1998-04-26 06:32:13 +00:00
Brian Somers
252ba33d3c Add natd support.
PR:		6339
Submitted by:	cdillon@wolves.k12.mo.us
1998-04-18 10:27:19 +00:00
Mark Murray
c1d639d22f Enable the SecureRPC bits in rc.conf, if the Administrator wants them. 1998-04-12 09:47:43 +00:00
Jordan K. Hubbard
115748d91d Allow rarpd to be started from rc.conf
PR:		5457
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
1998-03-09 08:50:30 +00:00
Brian Somers
71d854f63b Remove useless argument to ``. start_if.$ifn''
Pointed out by: Tim Tsai <tim@futuresouth.com>
1998-02-20 14:45:06 +00:00
Guido van Rooij
75e7ccb83d Add 2 new rc.conf variables:
forward_sourceroute : controls setting of existing net.inet.ip.sourceroute
accept_sourceroute : control setting of new net.inet.ip.accept_sourceroute
1998-02-16 19:21:32 +00:00
Alexander Langer
dbe11fd7dd Avoid using grep when determining ipfw's default policy -- it may not
be available at this stage of the boot if /usr is NFS mounted.
1998-02-14 04:12:23 +00:00
Alexander Langer
ad4463e18b Don't assume that IP services are disabled just because firewall_enable
is not set to YES in rc.conf.

Noticed by:	Mikael Karpberg <karpen@ocean.campus.luth.se>
1998-02-07 04:56:56 +00:00
Garrett Wollman
0da25c39b2 Add an additional `named_program' variable so that we can easily choose
between 4.9.6 and the port of 8.x.
1998-02-01 00:20:56 +00:00
Alexander Langer
e2fad09954 Compare return code from ipfw against 0 for success instead of == 1
for error.

Pointed out by:	Matthew Thyer <thyerm@camtech.net.au>
1998-01-10 03:33:39 +00:00
David E. O'Brien
75d1a35307 MF 22s 1997-12-01 06:11:34 +00:00