I found that the starting of my PPTP vpn during the boot process interferes with the loading of dnscrypt and ends up without dns after the boot. Can anyone tell me how to make the PPTP vpn wait another 60 seconds or what ever? I'm pretty certain this will fix me up.
#!/bin/sh
logger -s -t "($(basename $0))" $$ "PPTP Client connection requested....'$@'"
if [ -z "$1" ];then
logger -st "($(basename $0))" $$ "***ERROR missing arg1 PPTP_server_IP"
echo -e "\a"
exit 99
fi
nvram set vpnc_heartbeat_x="$1" # PPTP Server to connect to
nvram set vpnc_dnsenable_x="1"
nvram set vpnc_pppoe_passwd="xxxxxxxxxx"
nvram set vpnc_pppoe_username="uuuuuuuuuu"
nvram set vpnc_pptp_options_x="+mppe-128" # HMA explicitly rather than 'Auto'
nvram set vpnc_proto="pptp"
service restart_vpncall
sleep 20
logger -s -t "($(basename $0))" $$ "PPTP Client request complete."
sleep 180
/jffs/scripts/UP_PPTP.sh pptp_server_IP
Hey @Martineau I set this up and rebooted but at the end of the boot in the logs is the notation: PPTP: Unknown host pptp_server_IP
It eventually hangs up. I have to activate the tunnel and then of course it starts fine.
Any ideas? I went with 180 seconds in the init-start script by the way.
He used 'pptp_server_IP' as a placeholder for you to substitute the actual IP of your server.
Hey @Martineau I set this up and rebooted but at the end of the boot in the logs is the notation: PPTP: Unknown host pptp_server_IP
Wasn't trying to jump in on your work (you do great work supporting users with your scripts). Just trying to save him some frustration...Thanks!...wonder if he also actually changed 'xxxxxxxxxx' and 'uuuuuuuu' to appropriate values
Hey thank you for help. The vpn seems to execute early in the boot. This script when configured right...lol works but it doesn't matter something else is starting the vpn earlier than this script is delayed for. Help please kind sirs!
Hey I was wondering if you can help me with a problem that has popped up since I added the script. My Dns goes down if I make any sort of setting change in webui. To fix a reboot is a must it seems. Any ideas?Do you have a PPTP profile defined? - if so then delete it - preferably all of them!
The rationale behind the current script is that if there is no PPTP profile, then @boot nothing can 'accidentally' start it! until you explicitly manually initiate the connection. Have you noticed that there is no PPTP 'Start with Wan' option like there is with OpenVPN Clients? - clearly the firmware tenaciously 'remembers' which PPTP profile was ACTIVE when the Router goes down and automatically reconnects @boot.
The downside is that when the PPTP connection is UP, you have no way of knowing this via the GUI.
P.S. You can create a dynamic Profile, but sadly the status in the GUI for this spoofed PPTP Profile is never set to 'connected', but it acts as an eye-catcher to prove the script ran!
How did you add DNSCrypt support? DNSCrypt support is usually tightly tied to dnsmasq....and dnsmasq can be restarted for multiple reasons including changes made through the gui. You may need to add add custom code to dnsmasq.postconf to try and handle the restart/reconfig for dnscrypt.Hey I was wondering if you can help me with a problem that has popped up since I added the script. My Dns goes down if I make any sort of setting change in webui. To fix a reboot is a must it seems. Any ideas?
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!