Enabling iptables to forward multicast or broadcast messages
Hi,
Can we enable IP tables to forward multicast or broadcast messages?
Our setup is as mentioned below
Machine A (end node, with Linux): 192.168.0.1
Machine B (end node, with Linux): 192.168.0.2
Machine C (IP forwarding, with Linux.
IP tables needs to be configured here.
This machine is connected to A and B on to separate Ethernet interfaces 1 and 2 respectively)
Interface 1: 192.168.0.3
Interface 2: 192.168.0.4
i.e. machine A and B are connected to each other via machine C.
I have a UDP application which will register all three machines to a multicast group (226.1.1.1), and UDP application on Machine A sends out a multicast message and UDP application on Machine B and C will be in a blocked recv() function. Since Machine A is connected to interface 1 of Machine C, the application in Machine C receives the packet, but the same is not forwarded to Machine B.
I have enabled IP Forwarding on Machine C by $ echo "1" > /proc/sys/net/ipv4/ip_forward and there are static routes to Machine A and B from C through interfaces 1 and 2.
Here is the IPTABLES log
$ iptables -A INPUT -m pkttype --pkt-type multicast -j LOG
$ dmesg -c
IN=eth0 OUT= MAC= SRC=192.168.0.1 DST=226.1.1.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2
IN=eth0 OUT= MAC= SRC=192.168.0.1 DST=226.1.1.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2
Thanks 'n regards
-Shyju N
|