Roman Welsch
Occasional Visitor
Hi , i have a little issue with the custom scripts, i make this 3 custom scripts
****************************************
cd /jffs/scripts
vi services-start
#!/bin/sh
MOVISTAR_TV_IP=10.100.130.80
MOVISTAR_TV_MASK=255.192.0.0
MOVISTAR_TV_GW=10.64.0.1
robocfg vlan 2 ports "0t 5t"
vconfig add eth0 2
ifconfig vlan2 $MOVISTAR_TV_IP netmask $MOVISTAR_TV_MASK up
ip route add to 172.26.0.0/16 via $MOVISTAR_TV_GW
ip route add to 172.23.0.0/16 via $MOVISTAR_TV_GW
/usr/sbin/igmpproxy /jffs/configs/igmpproxy.conf
cd /jffs/scripts
vi firewall-start
#!/bin/sh
iptables -I INPUT -p igmp -i vlan2 -d 224.0.0.0/4 -j ACCEPT
iptables -I INPUT -p udp -m udp -i vlan2 -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -p igmp -i vlan2 -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -p udp -i vlan2 -m udp -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -o vlan2 -j ACCEPT
/bin/echo 0 > /proc/sys/net/ipv4/conf/vlan2/rp_filter
/bin/echo 0 > /proc/sys/net/ipv4/conf/br0/rp_filter
cd /jffs/scripts
vi nat-start
#!/bin/sh
iptables -t nat -I POSTROUTING -o vlan2 -j MASQUERADE
/bin/echo 0 > /proc/sys/net/ipv4/conf/vlan2/rp_filter
/bin/echo 0 > /proc/sys/net/ipv4/conf/br0/rp_filter
cd /jffs/scripts
chmod a+x *
cd /jffs/configs
vi igmpproxy.conf
quickleave
phyint vlan2 upstream ratelimit 0 threshold 1
altnet 172.26.0.0/16;
altnet 172.23.0.0/16;
phyint br0 downstream ratelimit 0 threshold 1
******************************************************************
i can start manualy with this commands:
cd /jffs/scripts
./services-start
./firewall-start
./nat-start
but when reload the router the scripts dont start automatically ? any idea what may happen
****************************************
cd /jffs/scripts
vi services-start
#!/bin/sh
MOVISTAR_TV_IP=10.100.130.80
MOVISTAR_TV_MASK=255.192.0.0
MOVISTAR_TV_GW=10.64.0.1
robocfg vlan 2 ports "0t 5t"
vconfig add eth0 2
ifconfig vlan2 $MOVISTAR_TV_IP netmask $MOVISTAR_TV_MASK up
ip route add to 172.26.0.0/16 via $MOVISTAR_TV_GW
ip route add to 172.23.0.0/16 via $MOVISTAR_TV_GW
/usr/sbin/igmpproxy /jffs/configs/igmpproxy.conf
cd /jffs/scripts
vi firewall-start
#!/bin/sh
iptables -I INPUT -p igmp -i vlan2 -d 224.0.0.0/4 -j ACCEPT
iptables -I INPUT -p udp -m udp -i vlan2 -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -p igmp -i vlan2 -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -p udp -i vlan2 -m udp -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -o vlan2 -j ACCEPT
/bin/echo 0 > /proc/sys/net/ipv4/conf/vlan2/rp_filter
/bin/echo 0 > /proc/sys/net/ipv4/conf/br0/rp_filter
cd /jffs/scripts
vi nat-start
#!/bin/sh
iptables -t nat -I POSTROUTING -o vlan2 -j MASQUERADE
/bin/echo 0 > /proc/sys/net/ipv4/conf/vlan2/rp_filter
/bin/echo 0 > /proc/sys/net/ipv4/conf/br0/rp_filter
cd /jffs/scripts
chmod a+x *
cd /jffs/configs
vi igmpproxy.conf
quickleave
phyint vlan2 upstream ratelimit 0 threshold 1
altnet 172.26.0.0/16;
altnet 172.23.0.0/16;
phyint br0 downstream ratelimit 0 threshold 1
******************************************************************
i can start manualy with this commands:
cd /jffs/scripts
./services-start
./firewall-start
./nat-start
but when reload the router the scripts dont start automatically ? any idea what may happen