Configure multicast routing on Debian with NAT

srv:/usr/src# wget http://downloads.sourceforge.net/project/igmpproxy/igmpproxy/0.1/igmpproxy-0.1.tar.gz
srv:/usr/src# cd igmpproxy/
srv:/usr/src/igmpproxy# ./configure && make && make install


Configure igmpproxy.conf:


srv:/usr/src/igmpproxy# cat /usr/local/etc/igmpproxy.conf | grep -v "^#"
quickleave
phyint eth0 upstream  ratelimit 0  threshold 1
        altnet 212.0.0.0/8
        altnet 213.0.0.0/8
phyint eth1 downstream  ratelimit 0  threshold 1
phyint ppp0 disabled
phyint eth2 disabled

srv:/usr/src/igmpproxy# 
igmpproxy -dv igmpproxy.conf
adding VIF, Ix 0 Fl 0x0 IP 0x0101000a eth1, Threshold: 1, Ratelimit: 0
adding VIF, Ix 1 Fl 0x0 IP 0x0101010a eth0, Threshold: 1, Ratelimit: 0
joinMcGroup: 224.0.0.2 on eth1
RECV Membership query   from 10.0.1.1        to 224.0.0.1
RECV Membership query   from your_ext_ip     to 224.0.0.1
RECV V2 member report   from 10.0.1.1        to 224.0.0.2
The IGMP message was from myself. Ignoring.
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 10.0.1.3        to 239.255.255.250
Inserted route table entry for 239.255.255.250 on VIF #0
joinMcGroup: 239.255.255.250 on eth0
RECV V2 member report   from 10.1.1.1        to 239.255.255.250
...
etc


Configure iptables:


srv:/# cat /etc/init.d/firewall | grep 224
insert ("-t filter -A INPUT -d 224.0.0.0/240.0.0.0 -i eth0 -j ACCEPT");
insert ("-t filter -A INPUT -s 224.0.0.0/240.0.0.0 -i eth0 -j ACCEPT");
insert ("-t filter -A FORWARD -d 224.0.0.0/240.0.0.0 -j ACCEPT");
insert ("-t filter -A FORWARD -s 224.0.0.0/240.0.0.0 -j ACCEPT");
insert ("-t mangle -A PREROUTING -d 224.0.0.0/240.0.0.0 -p udp -j TTL --ttl-inc 1");


TODO: start-stop daemon

No comments:

Post a Comment