Friday, 30 November 2012

Configuration for HDBOX



CPE Configuration for HDBOX Setup (TL-WR740N)
Disable Firewall
1. On the router web page click on Security. Select the Firewall Tab
2. Select the Disable option under SPI Firewall and Press Save
Create Startup Configuration
We need to create a configuration file for the IGMP proxy daemon to use WAN interface of CPE for upstream multicast traffic and LAN interface for downstream multicast traffic. No other interface will accept IGMP requests. Next we need to start the IGMP proxy daemon using this configuration file.
Third we need to configure the VOD Subnet IP on the WAN interface of the CPE and configure a static route to send the traffic of VOD streaming servers using the VOD subnet. Last we need to enable NAT for traffic going out of the VOD subnet interface.
On the router web page click on Administration. Select the Commands Tab
Enter the following commands in the Command Shell text box and press Save Startup.
mkdir /tmp/etc/config
echo "quickleave
phyint eth0 upstream ratelimit 0 threshold 1
phyint br0 downstream ratelimit 0 threshold 1
phyint br0:0 disabled
phyint ppp0 disabled
phyint eth1 disabled
phyint wifi0 disabled
phyint ath0 disabled
phyint lo disabled" > /tmp/igmpcustom.conf
echo "until igmprt /tmp/igmpcustom.conf; do
date >> /tmp/etc/config/iptv.log
killall igmprt
sleep 5
done" > /tmp/etc/config/startiptv.wanup
echo "COUNT=\$( cat /proc/net/igmp | grep E | grep -v E0000001 | wc -l )
if [ \$COUNT = 2 ]
then
exit 0
fi
IPTVSTATUS=\$( grep E0000002 /proc/net/igmp | awk -F\" \" '{print \$3}' )
if [ "\$IPTVSTATUS" = "0:00000000" ]
then
exit 0
else
killall -9 igmprt
igmprt /tmp/igmpcustom.conf
fi" > /tmp/etc/config/checkiptv.sh
chmod +x /tmp/etc/config/startiptv.wanup
chmod +x /tmp/etc/config/checkiptv.sh
ifconfig eth0 VOD-CPE-IP netmask 255.255.252.0
route add -net 10.50.0.0 netmask 255.255.240.0 gw VOD-GW-IP
Clear the text box and enter the following command. Press Save Firewall.
iptables -t nat -I POSTROUTING -d 10.50.0.0/20 -o eth0 -j SNAT --to VOD-CPE-IP
iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1452:65535 -j TCPMSS --clamp-mss-to-pmtu
AFTER THIS CONFIGURATION, GO TO ADMINISTRATION, THEN MANAGEMENT. ENABLE CRON AND PASTE THE FOLLOWING COMMAND IN THE BOX:
*/1 * * * * root /tmp/etc/config/checkiptv.sh
CLICK SAVE AND APPLY
Disable Multicast Traffic for Wireless Adaptor
1. Go to Wireless → Basic setting → Check Advance Settings option
2. Set "Network Configuration" to "Unbridged", and "Multicast Forwarding" to Disable.
3. Provide 192.168.3.1 with subnet mask 255.255.255.0 as the IP address for Wireless
connections
Enable DHCP for the additional local Networks
1. Go to Setup → Networking, add a DHCP Servers in the bottom area for ath0 (keep the
standard settings for the other fields)
2. Apply all changes, and reboot the router
CPE Configuration for HDBOX Setup (TL-WR1043ND)
Disable Firewall
1. On the router web page click on Security. Select the Firewall Tab
2. Select the Disable option under SPI Firewall and Press Save
Create Startup Configuration
We need to create a configuration file for the IGMP proxy daemon to use WAN interface of CPE for upstream multicast traffic and LAN interface for downstream multicast traffic. No other interface will accept IGMP requests. Next we need to start the IGMP proxy daemon using this configuration file.
Third we need to configure the VOD Subnet IP on the WAN interface of the CPE and configure a static route to send the traffic of VOD streaming servers using the VOD subnet. Last we need to enable NAT for traffic going out of the VOD subnet interface.
On the router web page click on Administration. Select the Commands Tab
Enter the following commands in the Command Shell text box and press Save Startup.
mkdir /tmp/etc/config
echo "quickleave
phyint vlan2 upstream ratelimit 0 threshold 1
phyint br0 downstream ratelimit 0 threshold 1
phyint br0:0 disabled
phyint ppp0 disabled
phyint eth1 disabled
phyint etherip0 disabled
phyint ath0 disabled
phyint lo disabled" > /tmp/igmpcustom.conf
echo "until igmprt /tmp/igmpcustom.conf; do
date >> /tmp/etc/config/iptv.log
killall igmprt
sleep 5
done" > /tmp/etc/config/startiptv.wanup
echo "COUNT=\$( cat /proc/net/igmp | grep E | grep -v E0000001 | wc -l )
if [ \$COUNT = 2 ]
then
exit 0
fi
IPTVSTATUS=\$( grep E0000002 /proc/net/igmp | awk -F\" \" '{print \$3}' )
if [ "\$IPTVSTATUS" = "0:00000000" ]
then
exit 0
else
killall -9 igmprt
igmprt /tmp/igmpcustom.conf
fi" > /tmp/etc/config/checkiptv.sh
chmod +x /tmp/etc/config/startiptv.wanup
chmod +x /tmp/etc/config/checkiptv.sh
ifconfig vlan2 VOD-CPE-IP netmask 255.255.255.252
route add -net 10.50.0.0 netmask 255.255.255.0 gw VOD-GW-IP
Clear the text box and enter the following command. Press Save Firewall.
iptables -t nat -I POSTROUTING -d 10.50.0.0/24 -o vlan2 -j SNAT --to VOD-CPE-IP
iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1452:65535 -j TCPMSS --clamp-mss-to-pmtu
AFTER THIS CONFIGURATION, GO TO ADMINISTRATION, THEN MANAGEMENT. ENABLE CRON AND PASTE THE FOLLOWING COMMAND IN THE BOX:
*/1 * * * * root /tmp/etc/config/checkiptv.sh
CLICK SAVE AND APPLY
Disable Multicast Traffic for Wireless Adaptor
1. Go to Wireless → Basic setting → Check Advance Settings option
2. Set "Network Configuration" to "Unbridged", and "Multicast Forwarding" to Disable.
3. Provide 192.168.3.1 with subnet mask 255.255.255.0 as the IP address for Wireless
connections
Enable DHCP for the additional local Networks
1. Go to Setup → Networking, add a DHCP Servers in the bottom area for ath0 (keep the
standard settings for the other fields)
2. Apply all changes, and reboot the router

No comments:

Post a Comment

bilalhoney123@gmail.com

bilalhoney123@gmail.com