?
Solved

Windows Server 2003 need PPTP connection to stay on all the time

Posted on 2012-08-28
11
Medium Priority
?
889 Views
Last Modified: 2012-08-30
I have a Windows 2003 server that needs to maintain a pptp connection all the time.  How can I set pptp to always run?
0
Comment
Question by:dhuff2012
  • 6
  • 3
  • 2
11 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 2000 total points
ID: 38344472
You can use this powershell script (I hope you have powershell installed):
$ping=New-Object System.Net.NetworkInformation.Ping;
$remoteIP = "192.168.10.1"
$conn = "MyRASConnection"
$login = "Login"
$pass = "Password"
$a = 1
while ($a = 1) {
  $vpn=$ping.Send($remoteIP)
  if($vpn.Status -eq "Success") {
    Write-Host "VPN OK"
    Start-Sleep -Second 10
  }
  else {
    rasdial $conn /d
    Start-Sleep -Second 2
    rasdial $conn $login $pass 
  }
}

Open in new window

script ping some IP address in remote network ($remoteIP) and when it is unavailable, disconnect and reconnect VPN connection.
$conn - name of your PPTP connection
$login - login
$pass - password
0
 
LVL 37

Expert Comment

by:bbao
ID: 38344580
wondering if it is necessary to run a script for doing that.

it seems the same thing can be done by Windows Internet Options as shown below.

Internet Options - Connections
0
 
LVL 40

Expert Comment

by:als315
ID: 38344624
@bbao: in reality sometimes connection is established, but do not working.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dhuff2012
ID: 38346060
The problem is that PPTP disconnects when I log off.  Is there a way to fix this?
0
 
LVL 40

Expert Comment

by:als315
ID: 38347127
Did you used RRAS? Read this guide (Look at Router2 configuration):
http://technet.microsoft.com/en-us/library/cc758271(WS.10).aspx
0
 

Author Closing Comment

by:dhuff2012
ID: 38351634
Ok.  I have used powershell to create the following .ps1 file.  It works beutifully but how do I make it run at system boot on 2003 server?
0
 
LVL 40

Expert Comment

by:als315
ID: 38351697
I think you have closed question too early. If you need some connection like vpn connnection between two offices, you should use RRAS. You can, of course, use autologon, but it should not be preferred method
0
 
LVL 40

Expert Comment

by:als315
ID: 38352924
You can try to use task scheduler for script starting, may be it could be solution
0
 

Author Comment

by:dhuff2012
ID: 38352958
I was hoping for a way to put Powershell into the path to automatically start at system startup.  Any ideas?
0
 
LVL 37

Expert Comment

by:bbao
ID: 38352998
> I was hoping for a way to put Powershell into the path to automatically start at system startup.

load PS to run the script from the AUTOEXEC.BAT at root??

>  If you need some connection like vpn connnection between two offices, you should use RRAS.

anyway, i do strongly agree with als315 as RRAS is the proper way to establish VPN connections for the server, rather than an individual user.

>  in reality sometimes connection is established, but do not working.

if the connection can be established but no further traffic, it seems to be something wrong at the VPN server side.
0
 
LVL 40

Expert Comment

by:als315
ID: 38353012
taskOn next Screen of master you should set credentials
task1
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network traffic routing plays key role in your network, if you have single site with heavy browsing or multiple sites, replicating important application data from your Primary Default Gateway ,you have to route your other network traffic from your p…
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question