Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: netfilter <netfilter@lists.netfilter.org>
Subject: Re: broadcast and router ?
Date: Mon, 16 May 2005 16:22:40 -0500	[thread overview]
Message-ID: <42890F20.90808@riverviewtech.net> (raw)
In-Reply-To: <1403218a050516012475c0343f@mail.gmail.com>

> ebtables ??
> 
>>Hi. Sorry for my bad english.
>>
>>Our local chat use a UDP 8167 and broadcast. All is OK but people over
>>router in other network don't receive a packets.
>>
>>Can I have route this packets to they's network with iptables?
>>
>>networks are 192.168.0.255 and 192.168.1.255

If I could not get both networks working on a larger subnet (/23?) I would possibly try (D/S)NATing traffic that was destined to one subnetworks broadcast address to another and vice-versa.  I would also seriously look to see if there was an application level proxy for your chat program.  Below is a sample rule that I would be tempted to try:

iptables -t nat -A PREROUTING -i $LAN_1_if -d 192.168.0.255 -p udp --dport 8167 -j DNAT --to-destination 192.168.1.255
iptables -t nat -A PREROUTING -i $LAN_2_if -d 192.168.1.255 -p udp --dport 8167 -j DNAT --to-destination 192.168.0.255
iptables -t nat -A POSTROUTING -o $LAN_1_if -d 192.168.0.255 -p udp --dport 8167 -j SNAT --to-source $LAN_1_if_IP
iptables -t nat -A POSTROUTING -o $LAN_2_if -d 192.168.1.255 -p udp --dport 8167 -j SNAT --to-source $LAN_2_if_IP

I *think* this is a quick and *DIRTY* hack that should get the traffic to cross the subnets.  I say DIRTY b/c this type of practice is avoided for a lot of different reasons.  You may or may not want to SNAT the traffic depending on how the client software plays.  I would make sure to ONLY DNAT traffic to the broadcast to a specific UDP port to prevent spreading of any other broadcast traffic.



Grant. . . .


  reply	other threads:[~2005-05-16 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <42876bf0.7523c613.1324.592eSMTPIN_ADDED@mx.gmail.com>
2005-05-16  8:24 ` broadcast and router ? Mohamed Eldesoky
2005-05-16 21:22   ` Taylor, Grant [this message]
2005-05-15  0:36 Sdimitrov

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=42890F20.90808@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox