ipfwadm man page:
-r [port]
Redirect packets to a local socket. When this
option is set, packets accepted by this rule will
be redirected to a local socket, even if they were
sent to a remote host. If the specified redirec-
tion port is 0, which is the default value, the
destination port of a packet will be used as the
redirection port. This option is only valid in
input firewall rules with policy accept and can
only be used when the Linux kernel is compiled with
CONFIG_IP_TRANSPARENT_PROXY defined.
ipchains manpage:
REDIRECT is only legal for the input and user-defined
chains and can only be used when the Linux kernel is com-
piled with CONFIG_IP_TRANSPARENT_PROXY defined. With
this, packets will be redirected to a local socket, even
if they were sent to a remote host. If the specified
redirection port is 0, which is the default value, the
destination port of a packet will be used as the redirec-
tion port. When this target is used, an optional extra
argument (the port number) can be supplied.
Both man pages show that the redirect rule is only legal for
the input rule. It is possible to do a redirection on
the oubound .. but that seems to entail spawning a user
land application that utilizes the MSG_PROXY on the socket
itself. In short, bind to the socket and handle redirection
from user land.
If UDP Redirection via the kernel firewalling rules cannot
be handled then why is it an option?
-- "Reality is what you can get away with!" ++Robert Anton Wilson Major'Trips' E-Mail : shadow@cyberwizards.com || major@jimco-fwt.com- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/