From a58fc861516b20d356a8a159c2dc6daef34205a1 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 13 May 2020 02:17:27 +0000 Subject: 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. Submitted by: debdrup MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24800 --- usr.sbin/inetd/inetd.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/inetd/inetd.8 b/usr.sbin/inetd/inetd.8 index 8a09c9194f54..4dbb1f4759dd 100644 --- a/usr.sbin/inetd/inetd.8 +++ b/usr.sbin/inetd/inetd.8 @@ -28,7 +28,7 @@ .\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94 .\" $FreeBSD$ .\" -.Dd January 12, 2008 +.Dd May 12, 2020 .Dt INETD 8 .Os .Sh NAME @@ -800,6 +800,8 @@ shell stream tcp46 nowait root /usr/libexec/rshd rshd tcpmux/+date stream tcp nowait guest /bin/date date tcpmux/phonebook stream tcp nowait guest /usr/local/bin/phonebook phonebook rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd +# 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 /var/run/echo stream unix nowait root internal #@ ipsec ah/require chargen stream tcp nowait root internal @@ -914,6 +916,7 @@ in the database. .El .Sh SEE ALSO +.Xr nc 1 , .Xr ipsec_set_policy 3 , .Xr hosts_access 5 , .Xr hosts_options 5 , -- cgit v1.2.3