Openwrt/include
Jo-Philipp Wich a9977eca91 firewall: allow local redirection of ports
Allow a redirect like:

config redirect
        option src 'wan'
        option dest 'lan'
        option src_dport '22001'
        option dest_port '22'
        option proto 'tcp'

note the absence of the "dest_ip" field, meaning to terminate the connection on the firewall itself.

This patch makes three changes:

(1) moves the conntrack module into the conntrack package (but not any of the conntrack_* helpers).
(2) fixes a bug where the wrong table is used when the "dest_ip" field is absent.
(3) accepts incoming connections on the destination port on the input_ZONE table, but only for DNATted
    connections.

In the above example,

ssh -p 22 root@myrouter

would fail from the outside, but:

ssh -p 22001 root@myrouter

would succeed.  This is handy if:

(1) you want to avoid ssh probes on your router, or
(2) you want to redirect incoming connections on port 22 to some machine inside your firewall, but
    still want to allow firewall access from outside.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>

SVN-Revision: 26617
2011-04-12 20:03:59 +00:00
..
site
autotools.mk autotools.mk: disable autoreconf recursion if more than one dir is given in PKG_AUTOMAKE_PATHS 2011-04-11 14:18:55 +00:00
cmake.mk cmake.mk: don't assume toolchain binaries in .../bin/ if an external toolchain is used, rely on which instead 2011-04-11 02:11:11 +00:00
debug.mk
depends.mk
download.mk
host-build.mk
host.mk
image.mk
kernel-build.mk build: clean up handling of the kernel config 2011-04-06 14:48:55 +00:00
kernel-defaults.mk build: clean up handling of the kernel config 2011-04-06 14:48:55 +00:00
kernel-version.mk
kernel.mk
netfilter.mk firewall: allow local redirection of ports 2011-04-12 20:03:59 +00:00
nls.mk
package-bin.mk
package-defaults.mk add a new package metadata variable MDEPENDS for specifying local menuconfig dependencies that do not propagate to other packages 2011-04-05 19:03:51 +00:00
package-dumpinfo.mk add a new package metadata variable MDEPENDS for specifying local menuconfig dependencies that do not propagate to other packages 2011-04-05 19:03:51 +00:00
package-ipkg.mk
package-version-override.mk
package.mk
prereq-build.mk
prereq.mk
quilt.mk
scan.mk build: log package dump failures to logs to avoid forcing user to write cryptic commands to figure out what's going on 2011-04-06 14:48:59 +00:00
shell.sh
subdir.mk
target.mk build: clean up handling of the kernel config 2011-04-06 14:48:55 +00:00
toolchain-build.mk
toplevel.mk
unpack.mk
verbose.mk