Зайчик пише

Tips, tricks, cheatsheets


Project maintained by iamzaychik Hosted on GitHub Pages — Theme by mattgraham

DD-WRT IPTV

2019-04-15


  1. Enable ssh:
  2. Enable jffs:
  3. Connect to ssh:
  4. Download udpxy for needed chip Broadcom | Atheros to jffs and set permissions: Note, than /jffs not clean after reboot, but /tmp does
    wget -P /jffs/ http://***********
    chmod +x /jffs/udpxy
    
  5. Set IP for WAN interface:
    ifconfig vlan2 down
    ifconfig vlan2 10.10.***.*** netmask 255.255.252.0
    ifconfig vlan2 up
    
  6. Add command:
  7. Insert here:
    route add -net 78.137.1.128 netmask 255.255.255.128 gw 10.10.***.5
    route add -net 91.105.204.0 netmask 255.255.255.0   gw 10.10.***.5
    sleep 60
    /jffs/udpxy -a 192.168.1.1 -p 8080
    echo 2 >/proc/sys/net/ipv4/conf/all/force_igmp_version
    route add -net 224.0.0.0/4 dev vlan2
    echo "quickleave" > /tmp/igmprt.conf
    echo "phyint vlan2 upstream ratelimit 0 threshold 1" >> /tmp/igmprt.conf
    echo "phyint br0 downstream ratelimit 0 threshold 1" >> /tmp/igmprt.conf
    echo "phyint br0:0 disabled" >> /tmp/igmprt.conf
    echo "phyint eth0 disabled" >> /tmp/igmprt.conf
    echo "phyint eth1 disabled" >> /tmp/igmprt.conf
    echo "phyint etherip0 disabled" >> /tmp/igmprt.conf
    echo "phyint vlan0 disabled" >> /tmp/igmprt.conf
    echo "phyint vlan1 disabled" >> /tmp/igmprt.conf
    echo "phyint lo disabled" >> /tmp/igmprt.conf
    igmprt /tmp/igmprt.conf
    
  8. Press Save startup
  9. Next insert:
    iptables -A FORWARD -s 192.168.1.0/24 -j ACCEPT
    iptables -A FORWARD -d 192.168.1.0/24 -j ACCEPT
    iptables -t nat -A POSTROUTING -o vlan2 -s 192.168.1.0/24 -j MASQUERADE
    iptables -t filter -I INPUT -d 224.0.0.0/240.0.0.0 -j ACCEPT
    iptables -t filter -I INPUT -s 224.0.0.0/240.0.0.0 -j ACCEPT
    iptables -t filter -I FORWARD -d 224.0.0.0/240.0.0.0 -j ACCEPT
    iptables -t filter -I FORWARD -s 224.0.0.0/240.0.0.0 -j ACCEPT
    iptables -t mangle -A PREROUTING -d 224.0.0.0/240.0.0.0 -j TTL --ttl-inc 1
    
  10. Press Save firewall