All of lore.kernel.org
 help / color / mirror / Atom feed
From: Constantine Sapuntzakis <csapuntz@gmail.com>
To: netfilter-devel@lists.netfilter.org
Subject: Preliminary NetBIOS datagram NAT filter
Date: Wed, 23 Feb 2005 20:38:43 -0800	[thread overview]
Message-ID: <ea59786f050223203860806aa2@mail.gmail.com> (raw)

http://suif.stanford.edu/~csapuntz/ip_nat_netbios.c

Using this, I was able to join a Windows NT domain and login into the
domain from behind a NAT.

I had a hard time understanding all the parameters to the various
methods, so I probably got it wrong for anything except for source NAT
(which I tested). I'd appreciate any help from more experienced
developers.

Here's the problem with NetBIOS. NetBIOS datagrams contain the source
IP address and
source port as bytes 4-9 of the UDP payload. These need to be
rewritten while traversing a NAT.

Here are some questions:

- the HOWTO seems to indicate you want to override
hlpr->tuple.dst.u.udp.port but all the examples override
hlpr->tuple.src.u.udp.port  to filter all traffic to a port. Which is
right?

- will this NAT helper work with two computers with different IP
addresses behind a NAT? i.e. if both computers send packets with
source port 138 and destination port 138, will it correctly move the
source port number of one of the packets. Or do I have to call some
extra functions.

- will this code work for other things that rewrite the source
address? What do I need to do to make it work?

Thanks,
-Costa

             reply	other threads:[~2005-02-24  4:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24  4:38 Constantine Sapuntzakis [this message]
2005-03-01 10:02 ` Preliminary NetBIOS datagram NAT filter Harald Welte

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=ea59786f050223203860806aa2@mail.gmail.com \
    --to=csapuntz@gmail.com \
    --cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.