LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2012, 11:22 AM   #1
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Rep: Reputation: 30
How to start VPN connection on boot?


I need to start PPTP VPN connection on boot in order to get to an external network. I have configured pptp-linux and now can start the connection using
Code:
sudo pon myvpn nodetach
or
Code:
sudo pppd call myvpn
. But I cannot figure out how to start it on boot (before a user logs in). I tried to put this line in rc.local without any result, tried to mess with /etc/ppp/ppp_on_boot and /etc/network/interfaces but nothing worked for me for the lack of knowledge of how do it properly. Could anyone help me with it? I need to do it on Ubuntu 10.04.

Last edited by foxy123; 09-11-2012 at 11:29 AM.
 
Old 09-19-2012, 03:49 AM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Do you need a password when running it manually with sudo?
 
Old 09-19-2012, 08:55 AM   #3
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by deadeyes View Post
Do you need a password when running it manually with sudo?
Apart from sudo password, no. I have the VPN password stored in /etc/ppp/chap-secrets.

Last edited by foxy123; 09-19-2012 at 08:57 AM.
 
Old 09-20-2012, 08:26 AM   #4
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by foxy123 View Post
Apart from sudo password, no. I have the VPN password stored in /etc/ppp/chap-secrets.
So you have to type the sudo password? How can the OS know this when you boot?

Could you print the specific line in visudo you added to make this work?
 
Old 09-20-2012, 02:49 PM   #5
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
I thought you don't need a password on that boot level. But I'm not sure.
 
Old 09-21-2012, 07:48 AM   #6
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by foxy123 View Post
I thought you don't need a password on that boot level. But I'm not sure.
If you need a password to execute the command when your desktop or user environment is running, you will need one as well at boot.

Otherwise you could just create a script to do some fishy stuff and execute it as root without a password?

THat is why I asked for the contents of visudo.
 
Old 09-22-2012, 09:52 AM   #7
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
Please see below
Code:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN Connection - Not able to browse other sites when connecting to VPN arindom Linux - Networking 25 07-02-2012 01:43 PM
How do I start the VPN? jbruyet Linux - Software 3 09-19-2011 10:00 AM
How to start pppoe connection at boot time? cola Slackware 1 12-28-2009 08:25 AM
VPN - is there a way to use VPN & normal connection at the same time? natv Linux - Networking 4 09-05-2007 08:48 AM
VPN connection rood47t Linux - Networking 1 07-23-2007 07:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration