Commit Graph

91 Commits

Author SHA1 Message Date
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