I'm fed up of the name clash with funnelweb. It ends here, and now.
Most of the work is with the Debian package, to provide a compatibility
package which does the right thing.
(setq skel-alist
(append
'((author . "Straylight/Edgeware")
- (program . "`fw'")
- (full-title . "the `fw' port forwarder"))
+ (program . "`fwd'")
+ (full-title . "the `fwd' port forwarder"))
skel-alist))
### -*-makefile-*-
###
-### Makefile for fw
+### Makefile for fwd
###
### (c) 1999 Mark Wooding
###
###----- Licensing notice ---------------------------------------------------
###
-### This file is part of the `fw' port forwarder.
+### This file is part of the `fwd' port forwarder.
###
-### `fw' is free software; you can redistribute it and/or modify
+### `fwd' is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
###
-### `fw' is distributed in the hope that it will be useful,
+### `fwd' is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
-### along with `fw'; if not, write to the Free Software Foundation,
+### along with `fwd'; if not, write to the Free Software Foundation,
### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
bin_PROGRAMS =
###--------------------------------------------------------------------------
### Documentation.
-make_manpage = perl $(srcdir)/make-manpage <$(srcdir)/fw.1.in
-EXTRA_DIST += fw.1.in make-manpage
+make_manpage = perl $(srcdir)/make-manpage <$(srcdir)/fwd.1.in
+EXTRA_DIST += fwd.1.in make-manpage
## The manual page.
-man_MANS += fw.1
-CLEANFILES += fw.1
+man_MANS += fwd.1
+CLEANFILES += fwd.1
-fw.1: fw.1.in make-manpage
+fwd.1: fwd.1.in make-manpage
$(make_manpage) man >$@.new && mv $@.new $@
## The grammar summary.
MAINTAINERCLEANFILES += $(srcdir)/GRAMMAR
EXTRA_DIST += GRAMMAR
-$(srcdir)/GRAMMAR: fw.1.in make-manpage
+$(srcdir)/GRAMMAR: fwd.1.in make-manpage
$(make_manpage) text >$@.new && mv $@.new $@
###--------------------------------------------------------------------------
### The main port forwarder.
-bin_PROGRAMS += fw
-fw_SOURCES =
-fw_LDADD = $(mLib_LIBS)
+bin_PROGRAMS += fwd
+fwd_SOURCES =
+fwd_LDADD = $(mLib_LIBS)
## Main program.
-fw_SOURCES += fw.c fw.h
+fwd_SOURCES += fwd.c fwd.h
-fw_SOURCES += chan.c
-fw_SOURCES += endpt.c
-fw_SOURCES += source.c
+fwd_SOURCES += chan.c
+fwd_SOURCES += endpt.c
+fwd_SOURCES += source.c
-fw_SOURCES += conf.c
-fw_SOURCES += scan.c
-fw_SOURCES += fattr.c
+fwd_SOURCES += conf.c
+fwd_SOURCES += scan.c
+fwd_SOURCES += fattr.c
-fw_SOURCES += reffd.c
+fwd_SOURCES += reffd.c
## Sockets.
-fw_SOURCES += socket.c
+fwd_SOURCES += socket.c
-fw_SOURCES += un.c
+fwd_SOURCES += un.c
-fw_SOURCES += inet.c
-fw_SOURCES += acl.c
-fw_SOURCES += identify.c
-fw_SOURCES += privconn.c
+fwd_SOURCES += inet.c
+fwd_SOURCES += acl.c
+fwd_SOURCES += identify.c
+fwd_SOURCES += privconn.c
## Files.
-fw_SOURCES += file.c
+fwd_SOURCES += file.c
## Executables.
-fw_SOURCES += exec.c
-fw_SOURCES += rlimits.h
+fwd_SOURCES += exec.c
+fwd_SOURCES += rlimits.h
## Documentation.
-fw_SOURCES += mantext.c
+fwd_SOURCES += mantext.c
CLEANFILES += mantext.c
BUILT_SOURCES += mantext.c
-mantext.c: fw.1.in make-manpage
+mantext.c: fwd.1.in make-manpage
$(make_manpage) c >$@.new && mv $@.new $@
###--------------------------------------------------------------------------
EXTRA_DIST += debian/copyright
## Run the daemon automatically.
-EXTRA_DIST += debian/fw.init
-EXTRA_DIST += debian/fw.postinst
+EXTRA_DIST += debian/fwd.init
+EXTRA_DIST += debian/fwd.postinst
+
+## Compatbility cruft.
+EXTRA_DIST += debian/fw.sh
+EXTRA_DIST += debian/fw.README.Debian
###----- That's all, folks --------------------------------------------------
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Main code ---------------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
#ifdef CHAN_DEBUG
# define D(x) x
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Main code ---------------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
dnl -*-autoconf-*-
dnl
-dnl Configuration script for fw
+dnl Configuration script for fwd
dnl
dnl (c) 2008 Straylight/Edgeware
dnl
dnl ----- Licensing notice --------------------------------------------------
dnl
-dnl This file is part of the `fw' port forwarder.
+dnl This file is part of the `fwd' port forwarder.
dnl
-dnl `fw' is free software; you can redistribute it and/or modify
+dnl `fwd' is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
-dnl `fw' is distributed in the hope that it will be useful,
+dnl `fwd' is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
-dnl along with `fw'; if not, write to the Free Software Foundation,
+dnl along with `fwd'; if not, write to the Free Software Foundation,
dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl--------------------------------------------------------------------------
dnl Initialization.
mdw_AUTO_VERSION
-AC_INIT([fw], AUTO_VERSION, [mdw@distorted.org.uk])
-AC_CONFIG_SRCDIR([fw.c])
+AC_INIT([fwd], AUTO_VERSION, [mdw@distorted.org.uk])
+AC_CONFIG_SRCDIR([fwd.c])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([foreign])
substvars
*.substvars
*.debhelper
-fw
+fwd
+fwd (1.3.5) experimental; urgency=low
+
+ * Rename package to fwd.
+
+ -- Mark Wooding <mdw@distorted.org.uk> Wed, 02 Apr 2008 09:42:04 +0100
+
fw (1.3.0) experimental; urgency=low
* Add --pidfile option.
-Source: fw
+Source: fwd
Section: net
Priority: extra
Build-Depends: mlib-dev (>= 2.0.3), debhelper (>= 4.0.2)
Maintainer: Mark Wooding <mdw@distorted.org.uk>
Standards-Version: 3.1.1
-Package: fw
+Package: fwd
Architecture: any
Depends: ${shlibs:Depends}
Description: Excessive port forwarder
- fw can forward connections to and from: TCP sockets, Unix-domain sockets,
+ fwd can forward connections to and from: TCP sockets, Unix-domain sockets,
locally-executed programs, and file descriptors. It can do host-based
access control. It will log incoming TCP connections by hostname and
username (as reported by identd on the connecting host). It subsumes the
basic functionality of inetd, cat, netcat and others. It runs as a
single nonblocking process.
+
+Package: fw
+Architecture: all
+Depends: fwd
+Conflicts: funnelweb
+Description: Excessive port forwarder
+ fwd can forward connections to and from: TCP sockets, Unix-domain sockets,
+ locally-executed programs, and file descriptors. It can do host-based
+ access control. It will log incoming TCP connections by hostname and
+ username (as reported by identd on the connecting host). It subsumes the
+ basic functionality of inetd, cat, netcat and others. It runs as a single
+ nonblocking process.
+ .
+ Once upon a time, fwd was called fw; but this conflicts with funnelweb's use
+ of the same name. This package depends on the new, renamed real package and
+ provides compatibility scripts and symlinks. Once you've fixed references
+ to the old name, you can delete this package.
-fw is copyright (c) 2003 Straylight/Edgeware.
+fwd is copyright (c) 2003 Straylight/Edgeware.
-fw is free software; you can redistribute it and/or modify
+fwd is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-fw is distributed in the hope that it will be useful,
+fwd is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
--- /dev/null
+fw renamed to fwd
+
+The port forwarder `fw' has been renamed, since funnelweb already uses
+that name. It's now called `fwd', which seems clear, and suggests that
+it might run as a daemon (which is true).
+
+This package provides a compatibility script with the old name. It nags
+you each time it runs, unless you set FW_RENAME_NAG=muffle in your
+environment. I recommend that you fix whatever it is that's calling fwd
+instead of setting this variable.
+
+ Mark Wooding, <mdw@distorted.org.uk>
+ 2008-04-02
+\f
+Local variables:
+mode: text
+End:
+++ /dev/null
-#! /bin/sh
-
-set -e
-getent group fw >/dev/null || addgroup --system fw
-getent passwd fw >/dev/null || {
- adduser --system --ingroup fw --home / fw
- usermod -c "Port forwarding daemon" -s /bin/false -g fw -G fw fw
-}
-
-#DEBHELPER#
--- /dev/null
+#! /bin/sh
+
+set -e
+case "$FW_RENAME_NAG" in
+ muffle) ;;
+ "") echo >&2 "$0: the \`fw' program been renamed to /usr/bin/fwd" ;;
+esac
+exec /usr/bin/fwd "$@"
#! /bin/sh
### BEGIN INIT INFO
-# Provides: fw
+# Provides: fwd
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="port forwarding daemon"
-NAME=fw
-DAEMON=/usr/bin/fw
+NAME=fwd
+DAEMON=/usr/bin/fwd
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
-FWUSER=fw FWGROUP=fw
+FWUSER=fwd FWGROUP=fwd
DAEMON_ARGS="--syslog"
-CONFIG=/etc/fw.conf
+CONFIG=/etc/fwd.conf
+OLDCONFIG=/etc/fw.conf
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Exit if no configuration file
+if [ -r "$CONFIG" ] && [ -r "$OLDCONFIG" ]; then
+ log_warning_message \
+ "Using old config file /etc/fw.conf. Please rename it to /etc/fwd.conf."
+ CONFIG=$OLDCONFIG
+fi
[ -r "$CONFIG" ] || exit 0
# Load the VERBOSE setting and other rcS variables
--- /dev/null
+#! /bin/sh
+
+set -e
+getent group fwd >/dev/null || addgroup --system fwd
+getent passwd fwd >/dev/null || {
+ adduser --system --ingroup fwd --home / fwd
+ usermod -c "Port forwarding daemon" -s /bin/false -g fwd -G fwd fwd
+}
+
+#DEBHELPER#
### General definitions.
DEB_BUILDDIR = $(CURDIR)/build
+DEB_DESTDIR = $(CURDIR)/debian/fwd
###--------------------------------------------------------------------------
### Documentation.
-DEB_INSTALL_DOCS_fw = GRAMMAR
+DEB_INSTALL_DOCS_fwd = GRAMMAR
-###----- That's all, folks --------------------------------------------------
\ No newline at end of file
+###--------------------------------------------------------------------------
+### Compatibility package.
+
+DEB_INSTALL_DIRS_fw = \
+ usr/bin \
+ usr/share/man/man1
+
+install/fw::
+ install -m755 debian/fw.sh debian/fw/usr/bin/fw
+ ln -s fwd.1.gz debian/fw/usr/share/man/man1/fw.1.gz
+
+###----- That's all, folks --------------------------------------------------
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Global variables --------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
.\" -*-nroff-*-
.\"
-.\" Manual page for fw
+.\" Manual page for fwd
.\"
.\" (c) 1999 Straylight/Edgeware
.\"
.
.\"----- Licensing notice ---------------------------------------------------
.\"
-.\" This file is part of the `fw' port forwarder.
+.\" This file is part of the `fwd' port forwarder.
.\"
-.\" `fw' is free software; you can redistribute it and/or modify
+.\" `fwd' is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
-.\" `fw' is distributed in the hope that it will be useful,
+.\" `fwd' is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
-.\" along with `fw'; if not, write to the Free Software Foundation,
+.\" along with `fwd'; if not, write to the Free Software Foundation,
.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.
.\"----- Various bits of fancy styling --------------------------------------
.
.\"--------------------------------------------------------------------------
.
-.TH fw 1 "1 July 1999" "Straylight/Edgeware" "fw port forwarder"
+.TH fwd 1 "1 July 1999" "Straylight/Edgeware" "fwd port forwarder"
.
.\"--------------------------------------------------------------------------
.SH NAME
.
-fw \- port forwarder
+fwd \- port forwarder
.
.\"--------------------------------------------------------------------------
.SH SYNOPSIS
.
-.B fw
+.B fwd
.RB [ \-dlq ]
.RB [ \-p
.IR file ]
.SH "DESCRIPTION"
.
The
-.B fw
+.B fwd
program is a simple port forwarder. It supports a number of features
the author hasn't found in similar programs:
.TP
Unix domain sockets, though. (Yet.)
.SS "Command line options"
The
-.B fw
+.B fwd
program understands a few simple command line options:
.TP
.B "\-h, \-\-help"
.TP
.BI "\-p, \-\-pidfile=" file
Write
-.BR fw 's
+.BR fwd 's
process-id to
.I file
during start-up. If
.SH "CONFIGURATION LANGUAGE"
.
The
-.B fw
+.B fwd
program has a fairly sophisticated configuration language to let you
describe which things should be forwarded where and what special
features there should be.
::=
.I option-stmt
|
-.I fw-stmt
+.I fwd-stmt
.br
-.I fw-stmt
+.I fwd-stmt
::=
-.B fw
+.B fwd
.I source
.I options
.RB [ to | \-> ]
.I option-seq
.GE
If you prefer, the keyword
-.RB ` fw '
+.RB ` fwd '
may be spelt
-.RB ` forward '
+.RB ` fwd ',
+.RB ` forward ',
or
.RB ` from '.
All are equivalent.
destination server is the target.
.PP
Essentially, all
-.B fw
+.B fwd
does is set up a collection of sources and targets based on your
configuration file so that when a source decides to initiate a data
flow, it tells its target to set its end up, and then squirts data back
.IR transient :
they set up one connection and then disappear. If all the sources
defined are transient, then
-.B fw
+.B fwd
will quit when no more active sources remain and all connections have
terminated.
.PP
The
-.B fw
+.B fwd
program is fairly versatile. It allows you to attach any supported type
of source to any supported type of target. This will, I hope, be the
case in all future versions.
.
.SS "Options structure"
Most of the objects that
-.B fw
+.B fwd
knows about (including sources and targets, but also other more specific
things such as socket address types) can have their behaviour modified
by
on the
.IR context .
A global option, outside of a
-.I fw-stmt
+.I fwd-stmt
has no context unless it is explicitly qualified, and affects global
behaviour. A local option, applied to a source or target in a
-.IR fw-stmt ,
+.IR fwd-stmt ,
has the context of the type of source or target to which it is applied,
and affects only that source or target.
.PP
.BR exec.logging ,
which have separate defaults, and which one you actually get depends on
the exact implementation of
-.BR fw 's
+.BR fwd 's
option parser. (Currently this would resolve to
.BR exec.logging ,
although this may change in a later version.)
.OE
.PP
Under no circumstances will
-.B fw
+.B fwd
create a file through a `dangling' symbolic link.
.
.SS "The `exec' source and target types"
.PP
The standard input and output of the program are forwarded to the other
end of the connection. The standard error stream is caught by
-.B fw
+.B fwd
and logged.
.PP
The
.OD
Make a privileged connection (i.e., from a low-numbered port) to the
target. This only works if
-.B fw
+.B fwd
was started with root privileges. However, it still works if
-.B fw
+.B fwd
has
.I dropped
privileges after initialization (the
.B \-s
option). Before dropping privileges,
-.B fw
+.B fwd
forks off a separate process which continues to run with root
privileges, and on demand passes sockets bound to privileged ports and
connected to the appropriate peer back to the main program. The
privileged child only passes back sockets connected to peer addresses
named in the configuration; even if the
-.B fw
+.B fwd
process is compromised, it can't make privileged connections to other
addresses. Note that because of this privilege separation, it's also
not possible to reconfigure
-.B fw
+.B fwd
to make privileged connections to different peer addresses later by
changing configuration files and sending the daemon a
.BR SIGHUP .
.OE
.PP
Sockets are removed if
-.B fw
+.B fwd
exits normally (which it will do if it runs out of sources or
connections, or if
-.B fw
+.B fwd
shuts down in a clean way).
.SH "EXAMPLES"
To forward the local port 25 to a main mail server:
.SH "SIGNAL HANDLING"
.
The
-.B fw
+.B fwd
program responds to various signals when it's running. If it receives
.B SIGTERM
or
.BR SIGINT ,
-.B fw
+.B fwd
performs a
.I graceful
shutdown: it removes all of its sources, and will exit when no more
connections are running. (Note that if the disposition
.B SIGINT
was to ignore it,
-.B fw
+.B fwd
does not re-enable the signal. You'll have to send
.B SIGTERM
in that case.) If
-.B fw
+.B fwd
receives
.BR SIGQUIT ,
it performs an
.PP
Finally, if any configuration files (other than standard input) were
provided to
-.B fw
+.B fwd
on its command line using the
.B \-f
option, a
.B SIGHUP
signal may be sent to instruct
-.B fw
+.B fwd
to reload its configuration. Any existing connections are allowed to
run their course. If no such configuration files are available,
-.B fw
+.B fwd
just logs a message about the signal and continues.
.
.\"--------------------------------------------------------------------------
The syntax for IP addresses and filenames is nasty.
.PP
IPv6 is not supported yet. Because of
-.BR fw 's
+.BR fwd 's
socket address architecture, it's probably not a major piece of work to
add.
.PP
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Global variables --------------------------------------------------*/
/* --- Handle a forwarding request --- */
if (strcmp(sc->d.buf, "forward") == 0 ||
- strcmp(sc->d.buf, "fw") == 0 ||
+ strcmp(sc->d.buf, "fwd") == 0 ||
strcmp(sc->d.buf, "from") == 0) {
source *s;
target *t;
*
* Returns: ---
*
- * Use: Increments or decrements the active thing count. `fw' won't
+ * Use: Increments or decrements the active thing count. `fwd' won't
* quit while there are active things.
*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
*
* Returns: ---
*
- * Use: Increments or decrements the active thing count. `fw' won't
+ * Use: Increments or decrements the active thing count. `fwd' won't
* quit while there are active things.
*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Magic numbers -----------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
* Generated grammar and options summary
*/
-#include "fw.h"
+#include "fwd.h"
EOF
for $head (keys %ch) {
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Main code ---------------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- File scanner source -----------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Static variables --------------------------------------------------*/
/*----- Licensing notice --------------------------------------------------*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fwd' port forwarder.
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fwd' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * `fw' is distributed in the hope that it will be useful,
+ * `fwd' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fwd'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "fw.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/