LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2014, 02:39 PM   #1
hemanshurpatel
Member
 
Registered: Jul 2009
Location: India
Distribution: fedora 12
Posts: 40

Rep: Reputation: 15
RPC broadcasting in two different subnet via IPtables


I'm not sure if this is possible at all or not. But let me tell you what I want to do.


I have two machines, both with two NIC.
MachineA 172.16.49.3/29 10.253.2.3/29
MachineB 172.16.49.14/29 10.253.2.11/29

router is configured so that machineA and MachineB can communicate via 172.16.49.X ips, I can't add anything else in router. So All I can use is IPtables now.

Now machineB does a RPC broadcast which is UDP based. that Broadcast is received by all other machine on 10.253.2.8/29 network. This is desired scenariao and it should keep working.

But we want the same broadcast also to be received by all host in subnet 10.253.2.0/29 network.

Now from MachineB which can communicate with machineA using 172.16 series IP, if we can copy that broadcast packet, so that one packet goes as it should annd sent the copied packet to machineA as broadcast packet and change its source ip as 10.253.2.3(MachineA ip) and destination ip as 10.253.2.7(Broadcast IP).

Is there any way of achieving what I want?

Please let me know if I couldn't explain properly. I'll try to add more sense.


Hemanshu

Last edited by hemanshurpatel; 12-04-2014 at 03:11 PM.
 
Old 12-04-2014, 02:42 PM   #2
hemanshurpatel
Member
 
Registered: Jul 2009
Location: India
Distribution: fedora 12
Posts: 40

Original Poster
Rep: Reputation: 15
I have root access of both machines.
 
Old 12-04-2014, 03:19 PM   #3
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,347

Rep: Reputation: Disabled
By their very nature, broadcasts aren't (and shouldn't be) forwarded to other networks.

Even if you could use iptables to modify the destination address of the broadcast packet, which I'm not sure you can, it would be of no consequence as Linux simply doesn't support forwarding (routing) of directed broadcast packets. You'd need a helper application of some sort.
 
Old 12-04-2014, 03:39 PM   #4
hemanshurpatel
Member
 
Registered: Jul 2009
Location: India
Distribution: fedora 12
Posts: 40

Original Poster
Rep: Reputation: 15
well with two rules of IPtables I have managed to send broadcasted packet from MachineB to all hosts of MachineA's subnet. But as I didn't copied it, now machineB's subent hosts are not receiving any broadcasted packet.

Hemanshu
 
Old 12-04-2014, 03:41 PM   #5
hemanshurpatel
Member
 
Registered: Jul 2009
Location: India
Distribution: fedora 12
Posts: 40

Original Poster
Rep: Reputation: 15
What I am doing is changing source and destination IP both and forwarding it to another subnet. but I have to do this operation in OUTPUT chain, which affects local packet, and no other hosts in same subnet receives it.

can I somehow create a copy of packet, perform operation of packet 1 and forward second as it is.
Is it possible?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables: allow only one subnet gtribe Linux - Networking 8 05-19-2014 05:12 PM
How can I configure iptables to allow portmap (rpc services) dirtgod Linux - General 1 12-16-2006 03:51 AM
how to enable multicast broadcasting with iptables? mac1234mac Linux - Networking 2 06-21-2006 05:31 AM
iptables - not broadcasting for dns queries raven02 Linux - Networking 1 06-08-2004 11:47 PM
using iptables to ban a subnet? Sm0k3 Linux - Networking 4 01-24-2004 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration