Hi Carlo, > sorry if I'm posting my problem here but the official support forums > seems to be dead... This is exactly the place for questions like these!
> I installed openvpn client from "snapshots2" repo available at > http://downloads.openwrt.org/kamikaze/8.09.2/rb532/packages/ > The client is working very well ;-) but I've a problem launching it at > startup. Did you know the Fonera comes shipped with the openvpn binaries as well? In the 2.3.6.1 version you're using, these might be a bit outdated and the supporting scripts might not all be present, but I think this openvpn binary should be capable of running as a client as well. You might want to upgrade to the 2.3.7.0 beta3 release to get a newer version, though. > I created the file "/etc/init.d/ovpnstart" as following: > > And the I ran the command: > > -------------------------------------------------------------------------- > root@Fonera:~# /etc/init.d/ovpnstart enable > -------------------------------------------------------------------------- Ok, that should be the right approach. > -------------------------------------------------------------------------- > #!/bin/sh /etc/rc.common > START=98 > start() { > # start VPN > touch /tmp/vpn-start-1 > /usr/sbin/openvpn --daemon --log /tmp/openvpn-log --config > /etc/openvpn/myvpn.ovpn > # set forwarding rules > touch /tmp/vpn-start-2 > /usr/sbin/iptables -A forwarding_rule -o tun0 -j ACCEPT > /usr/sbin/iptables -A forwarding_rule -i tun0 -j ACCEPT > /usr/sbin/iptables -t nat -A postrouting_rule -o tun0 -j MASQUERADE > touch /tmp/vpn-start-3 > } > > boot() { > touch /tmp/vpn-boot-1 > start > touch /tmp/vpn-boot-2 > If I run the command by hand, in the shell, the VPN starts correctly. With "the command" you mean /etc/init.d/ovpnstart (or the rc.d version)? Or the openvpn command directly? > If I reboot the Fonera I can't see the VPN running, but I can see the > "debug" files created from the script (see the "touch" command in the > script). Are the iptables rules created? I suspect they are, which would mean everything from your init script works except for the openvpn daemon itself. > /usr/sbin/openvpn --daemon --log /tmp/openvpn-log --config > /etc/openvpn/myvpn.ovpn Perhaps you could add " 2>&1 > /tmp/openvpn-debug" at the end of this command? This should redirect stderr to stdout and stdout to a file. If openvpn spews any errors before opening up its log file, you should see them. Gr. Matthijs
signature.asc
Description: Digital signature
_______________________________________________ Development mailing list [email protected] http://fonosfera.org/mailman/listinfo/development
