Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "John A. Sullivan III" <john.sullivan@nexusmgmt.com>
To: Younger Wang <younger.wang@42networks.com>
Cc: netfilter@lists.netfilter.org
Subject: RE: Is it possible to forward broadcasting with IPtables?
Date: Wed, 07 Apr 2004 12:08:54 -0400	[thread overview]
Message-ID: <1081354003.10117.3.camel@localhost> (raw)
In-Reply-To: <000001c41cb3$b3a03040$1664640a@Younger>

I've neither tried it nor thought it through but would the NAT
capabilities of iproute2 help here? Will iproute2 change the address
before Netfilter makes a decision of which filter table chain to use? -
John

On Wed, 2004-04-07 at 11:19, Younger Wang wrote:
> I tried DNAT in PREROUTING. 
> 
> Take an example: 
> The broadcasting is send from 10.0.0.22/24 to 10.0.0.255/24. I want the
> router( 10.0.0.1, 192.168.0.1 ) to forward it as from 10.0.0.22/24 to
> 192.168.0.255/24. 
> 
> I added:
> Iptables -t nat -A PREROUTING -p udp -d 10.0.0.255 --dport 137 -j DNAT
> --to-destination 192.168.0.255
> 
> The result is: 10.0.0.22-->10.0.0.255 was changed to
> 10.0.0.22-->192.168.0.255 in PREROUTING. Later on, in routing decision,
> it's still put to the INPUT chain because the router also listens to
> 192.168.0.255. That's the reason why DNAT in PREROUTING does not work
> and why I want to transfer the packet from INPUT chain to forward chain.
> 
> 
> BR
> Younger Wang
> 
> -----Original Message-----
> From: netfilter-admin@lists.netfilter.org
> [mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
> Sent: Wednesday, April 07, 2004 7:15 PM
> To: netfilter@lists.netfilter.org
> Subject: Re: Is it possible to forward broadcasting with IPtables?
> 
> On Wednesday 07 April 2004 12:07 pm, Younger Wang wrote:
> 
> > If the broadcast packets traverse the chains, they should be put to
> > INPUT chain. Is there a way to transfer a packet from INPUT chain to
> > FORWARD chain?
> 
> DNAT in PREROUTING?
> 
> In theory this would do what you want, however I'm sure it won't work.
> 
> Regards,
> 
> Antony.
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com



      reply	other threads:[~2004-04-07 16:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-07  6:38 Is it possible to forward broadcasting with IPtables? Younger Wang
2004-04-07  9:40 ` Antony Stone
2004-04-07 11:07   ` Younger Wang
2004-04-07 11:14     ` Antony Stone
2004-04-07 15:19       ` Younger Wang
2004-04-07 16:08         ` John A. Sullivan III [this message]

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=1081354003.10117.3.camel@localhost \
    --to=john.sullivan@nexusmgmt.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=younger.wang@42networks.com \
    /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