iptables MIRROR target

A while ago I wanted to make my iptables firewall a bit active. During my searches I found the iptables mirror target, which takes the packet sent to your machine and  returns the same packet to the machine the packet came from. Thus, let’s say someone tries to scan your machine or tries an attack he would scan his own machine or even attack his own machine.  Sadly the mirror target has been dropped somewhere around linux version 2.5 for security concerns. Somewhere in the web I found sources for a 2.5 kernel version and made them work with some 2.6.

I want to share this with the community now. So you can download the modified modules sources on www.mygnu.de. To build the module, boot  the kernel version you want to use the module with, and unpack the archive. Afterwards run the compile.sh script and the install.sh script.

Now you may use the mirror target in place of the reject or drop target  in the INPUT, FORWARD and PREROUTING chains, like this in your firewall script:

$IPTABLES -A INPUT -j MIRROR

Beware: The use of the mirror target may have strange results, i.e. if you want to connect to the iptables protected machine, you may end up connecting to the local machine without recognizing it. It also may use much bandwith. Worst case: if you have two machines using this module they may end up playing pingpong. So you have been warned, use with caution and at your own risk. For more information see: MIRROR target.

Downloads for the most recent kernel versions are below. Notice the version numbering 2.6.25 works for kernels up to 2.6.27. 2.6.28 also works for 2.6.29 and probably for future kernels. If you need a version for an older kernel, leave a comment. Then I can look if I have a module version archived for the kernel version you need.

[download#12]
[download#13]
[download#14]
[download#45]
gplv3-127x51

Addon: The 2.6.28 version also works for 2.6.30 kernels.

These versions do not work with 2.6.31 kernels. See iptables mirror target for kernel version 2.6.31 or iptables mirror target for kernel version 2.6.35 for the newer ones.

regards

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

siteinfo

Translator