Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Dec 2014, 12:07
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Start pptp VPN from a script
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 19 Mar 2009
Posts: 444

PostPosted: Wed 12 Nov 2014, 19:37    Post_subject:  Start pptp VPN from a script
Sub_title: More VPN fun!

Updated information is in the post below this one.

Would you like to start your pptp VPN with just the click of a mouse, or better yet, start automatically when you connect to a network?

This is a standalone solution that is not reliant on other software (Gpptp, OpenVPN, etc.). It is a bash script that uses the native pptp, pppd utilities included in most puppy LiveCD's.

This is a script called Qpptp (quick pptp) to do just that. There are actually two scripts. Once Qpptp starts, it loops continuously, keeping your VPN connection up until you kill it with Qpptp-kill.

The scripts install in your /root/my-applications/bin directory. You can put links to them on your desktop, or better yet, have the script start automatically when you boot by placing a link in /root/Startup.

Once the Qpptp script starts, here's what it does:
1) Checks that no other pptp processes are already running. Exits if there are.
2) Waits for a usable network to become available.
3) Once network availability is established, starts up pptp using your cedentials.
4) Loops forever, resetting itself if the pptp tunnel drops.

It keeps doing this until you stop it with Qpptp-kill

All you need to do to get started is edit the top three variables in the Qpptp script for the server name/address, your username, and your password.
Description  Quick-VPN

Filename  Quick-VPN-tray.pet 
Filesize  12.31 KB 
Downloaded  13 Time(s) 

Filename  Qpptp-scripts.pet 
Filesize  3.51 KB 
Downloaded  22 Time(s) 

Back to top
View user's profile Send_private_message 

Joined: 19 Mar 2009
Posts: 444

PostPosted: Wed 12 Nov 2014, 23:15    Post_subject:  

[ Update 22:58 UTC 11-19-2014 ] I've tweaked the scripts and the .pet so that it will install clean onto a LiveCD session. Before this, it assumed the user already had Gpptp v2.0 installed. It includes "myip" which is a shell command to check your public ip address, and "vpn-check" which I map to a Ctrl+alt+V keypress, that I use to quick-check the VPN tunnel.

I have also written a simple tray applet in C (Quick-Vpn-tray.pet above) to make and watch the pptp connection. It installs into "/root/my-applications/bin", and a link to it is in "/root/Startup" to start at boot.

Right-clicking the tray icon lets you edit your connection parameters, left clicking starts and stops the script.

If you are having trouble getting pptp to connect right, check here for pptp patches first.

Back to top
View user's profile Send_private_message 

Joined: 12 Oct 2012
Posts: 501
Location: The other Mr. 305

PostPosted: Thu 18 Dec 2014, 13:22    Post_subject:  

So, can you for example install this on multiple cd's or dvds and send them to friends or associates and have them boot to a vpn, all connected? Is that the goal of this?
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0477s ][ Queries: 12 (0.0076s) ][ GZIP on ]