mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Omar Aït Mous" <omar.aitmous@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Connection tracking synchronization module
Date: Tue, 1 Aug 2006 15:23:37 +0200	[thread overview]
Message-ID: <e084545e0608010623l1b6f07em4dda91c18121ecd2@mail.gmail.com> (raw)
In-Reply-To: <e084545e0608010617h9941cbchd366cf3ee6bcb0d0@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

On 8/1/06, Omar Aït Mous <omar.aitmous@gmail.com> wrote:
> This is a kernel module to allow real-time synchronization of connection
> tracking tables between two linux routers. It will be useful for people willing
> to achieve high availability of stateful firewalls, or NAT routers. It's our
> first attempt at kernel hacking, so there is probably many errors and things to
> fix, but it Works For Us (TM). you can even test it without recompiling your
> kernel. see attached README file for the gory details. You would be so kind to
> cc: us when replying ! :)
> Latest version can be found here :
> http://enix.fr/projects/syntrack/browser/tarballs/revision-90.tar.gz?format=raw
> Or here for future releases :
> http://enix.fr/projects/syntrack/browser/tarballs
>
And here is the attached README.

[-- Attachment #2: README --]
[-- Type: application/octet-stream, Size: 1911 bytes --]

Syntrack module
===============

This kernel module can be used to keep the connection tracking tables of two
Linux routers in sync. The module itself will allow reading & writing the
conntrack table thru a character device (/dev/syntrack ; should be created
automatically with your average udev configuration). To synchronize the table
with another router/firewall, you will also need a userland tool.

To compile :
If the kernel has been patched according to the changes described below,
make EXTRA_CFLAGS=-DNAT_EXPORTED
otherwise,
make

To execute :
Once compiled, you'll find in the source directory a file named 'syntrack.ko' 
corresponding to the module ; insmod it into your running kernel. It should
create the /dev/syntrack device.
To test the whole synchronization process, you will need two Linux routers,
which should run the same kernel (no testing has been done yet with different
kernel versions ; it should work as long as the same conntrack options have
been set on both sides).
Run "syntrack_send backup.ip" on the "main" router, and "syntrack_recv main.ip"
on the "backup" router. From now on, the /proc/net/ip_conntrack special file
on the backup router will reflect the changes of the same file on the main
router.

If you want NAT to work correctly, you should apply the following changes to
your kernel sources :
	
File : ip_nat_core.c (net/ipv4/netfilter)
line 47 : /*static */unsigned int ip_nat_htable_size;
line 49 : /*static */struct list_head *bysource;

new exported symbols :
EXPORT_SYMBOL_GPL(ip_nat_htable_size);
EXPORT_SYMBOL_GPL(ip_nat_lock);
EXPORT_SYMBOL_GPL(bysource);

You can also do this using the patch file nat.diff :
	patch -p1 < nat.diff
at the linux kernel source directory.
To unpatch, just try :
	patch -p1 -R < nat.diff
at the same directory.
Without those changes, synchronization without NAT will work ; usage of NAT
will yield unpredictable results however.


  reply	other threads:[~2006-08-01 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-01 13:17 Omar Aït Mous
2006-08-01 13:23 ` Omar Aït Mous [this message]
2006-08-01 22:12 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e084545e0608010623l1b6f07em4dda91c18121ecd2@mail.gmail.com \
    --to=omar.aitmous@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®