1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
|
**************************************
omudpspoof: UDP spoofing output module
**************************************
=========================== ===========================================================================
**Module Name:** **omudpspoof**
**Author:** David Lang <david@lang.hm> and `Rainer Gerhards <https://rainer.gerhards.net/>`_ <rgerhards@adiscon.com>
**Available Since:** 5.1.3
=========================== ===========================================================================
Purpose
=======
This module is similar to the regular UDP forwarder, but permits to
spoof the sender address. Also, it enables to circle through a number of
source ports.
**Important**: This module **requires root permissions**. This is a hard
requirement because raw socket access is necessary to fake UDP sender
addresses. As such, rsyslog cannot drop privileges if this module is
to be used. Ensure that you do **not** use `$PrivDropToUser` or
`$PrivDropToGroup`. Many distro default configurations (notably Ubuntu)
contain these statements. You need to remove or comment them out if you
want to use `omudpspoof`.
Configuration Parameters
========================
.. note::
Parameter names are case-insensitive.
Module Parameters
-----------------
Template
^^^^^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"word", "RSYSLOG_TraditionalForwardFormat", "no", "none"
This setting instructs omudpspoof to use a template different from
the default template for all of its actions that do not have a
template specified explicitly.
Action Parameters
-----------------
Target
^^^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"word", "none", "yes", "``$ActionOMUDPSpoofTargetHost``"
Host that the messages shall be sent to.
Port
^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"word", "514", "no", "``$ActionOMUDPSpoofTargetPort``"
Remote port that the messages shall be sent to. Default is 514.
SourceTemplate
^^^^^^^^^^^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"word", "RSYSLOG_omudpspoofDfltSourceTpl", "no", "``$ActionOMOMUDPSpoofSourceNameTemplate``"
This is the name of the template that contains a numerical IP
address that is to be used as the source system IP address. While it
may often be a constant value, it can be generated as usual via the
property replacer, as long as it is a valid IPv4 address. If not
specified, the build-in default template
RSYSLOG\_omudpspoofDfltSourceTpl is used. This template is defined as
follows:
$template RSYSLOG\_omudpspoofDfltSourceTpl,"%fromhost-ip%"
So in essence, the default template spoofs the address of the system
the message was received from. This is considered the most important
use case.
SourcePort.start
^^^^^^^^^^^^^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"integer", "32000", "no", "``$ActionOMUDPSpoofSourcePortStart``"
Specify the start value for circling the source ports. Start must be
less than or equal to sourcePort.End.
SourcePort.End
^^^^^^^^^^^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"integer", "42000", "no", "``$ActionOMUDPSpoofSourcePortEnd``"
Specify the end value for circling the source ports. End must be
equal to or more than sourcePort.Start.
MTU
^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"integer", "1500", "no", "none"
Maximum packet length to send.
Template
^^^^^^^^
.. csv-table::
:header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
:widths: auto
:class: parameter-table
"word", "RSYSLOG_TraditionalForwardFormat", "no", "``$ActionOMUDPSpoofDefaultTemplate``"
This setting instructs omudpspoof to use a template different from
the default template for all of its actions that do not have a
template specified explicitly.
Caveats/Known Bugs
==================
- **IPv6** is currently not supported. If you need this capability,
please let us know via the rsyslog mailing list.
- Throughput is MUCH smaller than when using omfwd module.
Examples
========
Forwarding message through multiple ports
-----------------------------------------
Forward the message to 192.168.1.1, using original source and port between 10000 and 19999.
.. code-block:: none
Action (
type="omudpspoof"
target="192.168.1.1"
sourceport.start="10000"
sourceport.end="19999"
)
Forwarding message using another source address
-----------------------------------------------
Forward the message to 192.168.1.1, using source address 192.168.111.111 and default ports.
.. code-block:: none
Module (
load="omudpspoof"
)
Template (
name="spoofaddr"
type="string"
string="192.168.111.111"
)
Action (
type="omudpspoof"
target="192.168.1.1"
sourcetemplate="spoofaddr"
)
|