Tekforums

Chat => Entertainment & Technology => Topic started by: soopahfly on April 12, 2006, 20:01:08 PM

Title: VPN
Post by: soopahfly on April 12, 2006, 20:01:08 PM
Im struggling to set up a VPN connection for my dads PC.
Ive got the desktop to be a server, and the laptop (on gprs) to be the client.
I can connect to the VPN, and the Server acknowledges the connection, but I cant do anything else.

Am I supposed to be able to map drives and stuff through the VPN? as its currently not working.

Anyone know where Im going wrong??
Title: Re:VPN
Post by: Beaker on April 12, 2006, 20:05:25 PM
what remote control software are you using?
Title: Re:VPN
Post by: soopahfly on April 12, 2006, 20:32:28 PM
Standard xp stuff
Title: Re:VPN
Post by: M3ta7h3ad on April 12, 2006, 20:34:12 PM
have you tried pinging computers on the VPN? you should be able to just access computers shared files/folders by typing the netbios name in.

Mapping drives should also work, but you may suffer the wrath of your laptop trying to connect to gprs constantly.
Title: Re:VPN
Post by: M3ta7h3ad on April 12, 2006, 20:34:39 PM
Quote from: Beakerwhat remote control software are you using?

Its a VPN not a Terminal Services jobbo :)
Title: VPN
Post by: Mardoni on April 12, 2006, 22:12:19 PM
make sure that remote Desktop Connection is enabled
Right click My Computer -> Properties -> Remote -> Allow remote Connections.

Also make sure that you manually add the user you want to log in via Remote desktop with. Oh and make sure that user has a password !

Next, make sure that any and all firewalls are allowing port 3389 and/or Remote Desktop connections.

Finally, if you are connecting over a VPN you will probably (99%) of the time have to do everything by IP as the built in NetBios / DNS stuff is flakey.

So to map drives / remote to the VPN server you will have to put in the IP address you assigned the VPN server, not the machines _normal_ IP.
Title: Re:VPN
Post by: Beaker on April 12, 2006, 22:24:03 PM
Quote from: M3ta7h3ad
Quote from: Beakerwhat remote control software are you using?

Its a VPN not a Terminal Services jobbo :)

the quick way to map the drive is the obvious "\\SERVER\SHARE" in the run box to test it, and using the Map Network Drive inside My Computer to actually set them up for reconnection.  

However if you are logging to another ocmputer and setting the network drives up on another PC then the Remote Desktop Connection inside XP is probably the easiest and cheapest option.  
Title: Re:VPN
Post by: soopahfly on April 13, 2006, 09:08:37 AM
Remote desktopping works fine, its just getting the VPN to let me map drives.
Ive only got an incoming connection on the "server" should that matter?
Title: VPN
Post by: Mardoni on April 13, 2006, 09:31:33 AM
Ill go and have a play now.

I use XP VPN to connect to my home network from work. Ive not tried mapping a drive before so Ill go and see if I can get it to work...
Title: VPN
Post by: Mardoni on April 13, 2006, 10:08:45 AM
ok...

I can map a drive over my VPN connection but I have to do it manually each time I log in due to the way I have my users/logins set up:

I have a user "Nimrod" on my XP machine at home. That is the main account that I log into the PC with and VPN/Allow remote connections are enabled for this user.

I also have a "Work" user on my XP machine at home, this user account has the same username and password as my account at work.

My VPN connect is configured to connect to my XP machine at home and log in as "Nimrod".

The Windows Security context used while browsing folders/mapping drives to the remote machine over the VPN is my work user account; as this is the active account on my work machine. Therefore I can only browse folders that have permissions set for the "Work" user account.

Therefore I can easily map a drive to any shared folder, where the share permissions give (at least) read rights to the "Work" user.
If I want to map a drive to a folder that "Nimrod" has access to but "Work" does not, I have to do it manually from the command line:

net use Z: \\192.168.2.250\ /user:Nimrod /PERSISTENT

If the VPN connection is lost, the mapped drive remains but disconnect. Once the connection is reestablished it is possible to browse the drive again.

...
My life would obviously be made a lot easier by configuring my VPN connection to login as my "Work" user account and making sure that all of the appropriate folders for that user had share permissions set.
Title: VPN
Post by: Mardoni on April 13, 2006, 13:56:21 PM
Right Ive spent the best part of the morning fannying around with netlogon scripts and I have come to the conclusion that you are pretty much going to have to do it manually as above.

There is one little "tweak" you could do. I was trying to get this to work via netlogon on the VPN server but alas MS have done something in XP to stop a VPN client from running netlogon scripts.

Anyway, if you create a script like this: all you would have to do is double click it after creating your VPN connection and the map drives would be recreated/connected.


@ ECHO ON
@ ECHO Deleting Existing Map
@ ECHO OFF
IF EXIST X: NET USE X: /DELETE

:CreateMap
@ ECHO ON
@ ECHO Creating Mapped Drive...
@ ECHO OFF
NET USE X: \\\

IF EXIST X: GOTO Mapped
GOTO CreateMap

:Mapped
@ ECHO ON
@ ECHO Complete


That will drop any existing map using the drive X: and then connect to on .

You could also have a script to run when the VPN connection is closed that just kills the mapped drives:


@ ECHO ON
@ ECHO Deleting Existing Map
@ECHO OFF
IF EXIST X: NET USE X: /DELETE


Its annoying that MS appear to have removed the ability to run these scripts automatically :/
Title: Re:VPN
Post by: Beaker on April 13, 2006, 16:58:13 PM
Whu?

My Computer > Tools > Map Network Drive works perfectly unless you have turned the option off, make sure the box for "Reconnect at logon" is ticked.  Ive done 4 today.  :\
Title: VPN
Post by: Mardoni on April 13, 2006, 20:35:00 PM
Yeah it is fine, except that on a laptop that has a mapped drive that is on the other end of a dial-up connection; one false move and youll get a connection dialog appear or worse, itll auto-dial and on a mobile / gprs thats expensive :o
Title: VPN
Post by: Beaker on April 13, 2006, 20:39:07 PM
Quote from: NimrodYeah it is fine, except that on a laptop that has a mapped drive that is on the other end of a dial-up connection; one false move and youll get a connection dialog appear or worse, itll auto-dial and on a mobile / gprs thats expensive :o

hmm, that depends.  You can set it up to not sync, ill take a look at the config info my lappy has.  Its out on loan atm, and the shares are set to sync when i plug it into the network, but if you arent actually pluged into the RJ45 it doesnt sync.  Cant remember offhand how i set it up though.