Hi all!
I've just bought an ASUS AC56U router and I've installed Asuswrt-Merlin v374-40. After reading a lot of posts, I set up Optware, Internet connection through Cisco VPN and I also share Internet vpn connection from LANs hosts, but I can't make the scripts persistent. Let me explain:
I've got a script called /jffs/scripts/services-start, with this code...
#!/bin/sh
/opt/etc/config/vpnc/startup-script
sleep 10
/opt/etc/config/vpnc/firewall-start
The "/opt/etc/config/vpnc/startup-script" script makes Cisco VPN connection possible and the "/opt/etc/config/vpnc/firewall-start" script has this code...
#!/bin/sh
iptables -F
iptables -t nat -F
iptables -A FORWARD -o tun0 -j ACCEPT
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
If I manually start "/jffs/scripts/services-start" script, all is working ok. But, if I reboot router to try starting it automatically, neither vpnc nor iptables rules take effect. I also tried to use a combination of scripts /jffs/scripts/firewall-start, /jffs/scripts/nat-start, /jffs/scripts/services-start, but none of them seems to boot or it's possible they will occur before something that made them change.
I don't know where should I put the script to have desired configuration. Some help please?
Thank you!
Cristian.
I've just bought an ASUS AC56U router and I've installed Asuswrt-Merlin v374-40. After reading a lot of posts, I set up Optware, Internet connection through Cisco VPN and I also share Internet vpn connection from LANs hosts, but I can't make the scripts persistent. Let me explain:
I've got a script called /jffs/scripts/services-start, with this code...
#!/bin/sh
/opt/etc/config/vpnc/startup-script
sleep 10
/opt/etc/config/vpnc/firewall-start
The "/opt/etc/config/vpnc/startup-script" script makes Cisco VPN connection possible and the "/opt/etc/config/vpnc/firewall-start" script has this code...
#!/bin/sh
iptables -F
iptables -t nat -F
iptables -A FORWARD -o tun0 -j ACCEPT
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
If I manually start "/jffs/scripts/services-start" script, all is working ok. But, if I reboot router to try starting it automatically, neither vpnc nor iptables rules take effect. I also tried to use a combination of scripts /jffs/scripts/firewall-start, /jffs/scripts/nat-start, /jffs/scripts/services-start, but none of them seems to boot or it's possible they will occur before something that made them change.
I don't know where should I put the script to have desired configuration. Some help please?
Thank you!
Cristian.