Pre tych co to chcu nastavit, tu je moje funkcne nastavenie routovania. eth0 je vstup, eth1 je vystup. Funguje sledovanie vsetkych programov z vnutornej siete (eth1) ako aj zapojenie STB do vnutornej siete. Archiv STB vyzaduje presmerovanie UDP portu 20000.
Je traba mat kernel s CONFIG_VLAN_8021Q=m a CONFIG_IP_MROUTE=y, aplikacie dnsmasq (alebo iny dhcp a dns server) a igmpproxy (z
http://sourceforge.net/projects/igmpproxy/). Namiesto igmpproxy by sa mal dal nakonfigurovat aj mroute daemon.
Tu su konfiguraky /etc/network/interfaces a /etc/igmpproxy.conf. Treba nahradit <ID> za vlan id a <MAC> za mac adresu toho STB. vlan id ako aj mac adresa by sa mali dat vycitat z panelu toho STB.
/etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
post-up ip link add link eth0 name eth0.<ID> type vlan id <ID> || true
post-down ip link delete eth0.<ID> || true
iface eth0.<ID> inet dhcp
post-up ip route add 224.0.0.0/4 dev eth0.<ID>
hwaddress ether <MAC>
client udhcpc
hostname ""
iface eth1 inet static
pre-up sysctl net.ipv4.ip_forward=1
post-up ip link add link eth1 name eth1.<ID> type vlan id <ID>; dnsmasq -i eth1 -i eth1.<ID> -I lo -a 192.168.1.1 -z -F 192.168.1.2,192.168.1.100,255.255.255.0,1h -K -x /var/run/dnsmasq.eth1.pid -C /dev/null; ENABLED=1 /etc/init.d/igmpproxy start || true
pre-down kill `cat /var/run/dnsmasq.eth1.pid` 2>/dev/null; rm -f /var/run/dnsmasq.eth1.pid; ENABLED=1 /etc/init.d/igmpproxy stop; ip link delete eth1.<ID> || true
post-down sysctl net.ipv4.ip_forward=0
address 192.168.1.1
netmask 255.255.255.0
iface eth1.<ID> inet static
address 192.168.1.1
netmask 255.255.255.0
/etc/igmpproxy.conf
quickleave
phyint eth0.<ID> upstream ratelimit 0 threshold 1
altnet 88.212.8.3
phyint eth1 downstream ratelimit 0 threshold 1
phyint eth1.<ID> downstream ratelimit 0 threshold 1
phyint eth0 disable