netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: netfilter-devel@vger.kernel.org
Subject: UDP DNAT to a broadcast address
Date: Wed, 18 May 2011 17:58:09 +0200	[thread overview]
Message-ID: <m2wrhorofi.fsf@ohwell.denx.de> (raw)

Hi,

looking for the answer to this problem, I searched the web and this
mailing list, but I still couldn't find a definitive answer to the
question that I have.

In my setup I need to a UDP packet sent to the external IP of my router
to trigger a broadcast UDP packet on the local network and relay back
the answers to this packet.

It looks like this should do the trick:

iptables -t nat -I PREROUTING -i ppp0 -p udp --dport 3333 -j DNAT --to 192.168.0.255

Of course, as I write this e-mail, this does not work.  I can see the
packets entering the INPUT chain, but I see no packets on the OUTPUT
chain.  I speculate that this is because braodcast addresses are not
routable and thus the packet gets lost somewhere.

Is there any method to solve this with netfilter or do I need to write a
bi-directional UDP proxy in userspace?

Thanks
  Detlev

-- 
(3)   With sufficient thrust,  pigs fly just fine.  However, this is not
necessarily a good idea.  It is hard to be sure  where they are going to
land, and it could be dangerous sitting under them as they fly overhead.
                              -- The Twelve Networking Truths (RFC 1925)


             reply	other threads:[~2011-05-18 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 15:58 Detlev Zundel [this message]
2011-05-18 20:18 ` UDP DNAT to a broadcast address Jan Engelhardt
2011-05-19  7:19   ` Detlev Zundel

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=m2wrhorofi.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).