From owner-svn-src-all@freebsd.org Thu May 21 01:53:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9888B2FC0EE; Thu, 21 May 2020 01:53:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49SCLm3bHfz47XW; Thu, 21 May 2020 01:53:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76769259D7; Thu, 21 May 2020 01:53:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04L1r4K2061763; Thu, 21 May 2020 01:53:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04L1r4aH061762; Thu, 21 May 2020 01:53:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202005210153.04L1r4aH061762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 21 May 2020 01:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361311 - in stable: 11/usr.sbin/inetd 12/usr.sbin/inetd X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.sbin/inetd 12/usr.sbin/inetd X-SVN-Commit-Revision: 361311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2020 01:53:04 -0000 Author: kevans Date: Thu May 21 01:53:03 2020 New Revision: 361311 URL: https://svnweb.freebsd.org/changeset/base/361311 Log: MFC r361000, r361036: improve inetd(8) examples r361000: inetd(8): Provide HTTP proxy example using netcat One of the fortunes that are included in freebsd-tips talks about how the superserver can be used to proxy connections with netcat, but there are no examples provided. This commit adds an example with comment explaining what it does. r361036: inetd(8): Add comments to all examples Modified: stable/12/usr.sbin/inetd/inetd.8 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/inetd/inetd.8 Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/inetd/inetd.8 ============================================================================== --- stable/12/usr.sbin/inetd/inetd.8 Thu May 21 01:23:59 2020 (r361310) +++ stable/12/usr.sbin/inetd/inetd.8 Thu May 21 01:53:03 2020 (r361311) @@ -28,7 +28,7 @@ .\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94 .\" $FreeBSD$ .\" -.Dd January 12, 2008 +.Dd May 14, 2020 .Dt INETD 8 .Os .Sh NAME @@ -793,14 +793,30 @@ the pid of the currently running .Sh "EXAMPLES" Here are several example service entries for the various types of services: .Bd -literal +# The first four launch the relevant daemon when a connection on a port +# as defined by /etc/services is opened. ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l ntalk dgram udp wait root /usr/libexec/ntalkd ntalkd telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd shell stream tcp46 nowait root /usr/libexec/rshd rshd + +# Let the system respond to date requests via tcpmux tcpmux/+date stream tcp nowait guest /bin/date date + +# Let people access the system phonebook via tcpmux tcpmux/phonebook stream tcp nowait guest /usr/local/bin/phonebook phonebook + +# Make kernel statistics accessible rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd -/var/run/echo stream unix nowait root internal + +# Use netcat as a one-shot HTTP proxy with nc (from freebsd-tips fortune) +http stream tcp nowait nobody /usr/bin/nc nc -N dest-ip 80 + +# Set up a unix socket at /var/run/echo that echo's back whatever is written +# to it. +/var/run/echo stream unix nowait root internal + +# Run chargen for IPsec Authentication Headers #@ ipsec ah/require chargen stream tcp nowait root internal #@ @@ -914,6 +930,7 @@ in the database. .El .Sh SEE ALSO +.Xr nc 1 , .Xr ipsec_set_policy 3 , .Xr hosts_access 5 , .Xr hosts_options 5 ,