# Connecting to my university's VPN

## Shining Arcanine

My university has a VPN which it requires wireless users use to be able to connect to any remote port other than port 80. When I had Windows, I could install a Windows client that the university provided that would do this connection for me. Now that I am using Gentoo Linux, there is no client provided by my university, so I am on my own. I spoke to the people in charge of my university's wireless network and they told me that if I am able to use Linux, I am able to provide my own support. :/

Anyway, I was banging my head trying to get it to work. I have kvpnc installed and I have followed all of the guides that were provided the local Linux Users Group for connecting to the VPN, but their guides were meant for Ubuntu Linux, which uses Gnome, so they were not much help. After doing some more searching, I found the following page, which had some suggestions on additional things to compile into my kernel:

http://pptpclient.sourceforge.net/howto-gentoo.phtml

I compiled them into the kernel. I am off campus at the moment, so I am trying to connect to the VPN from an external IP, which might not be allowed as Kvpnc is crashing on connection attempts that I make, which did not happen on campus.

That is my problem in summary. If anyone has any tips they could provide to me, it would be appreciated, although I do not expect much assistance considering that I omitted which university I attend for personal reasons. Anyway, I do have a question that I hope people here can answer. The page at sourceforge suggests compiling alot of stuff as modules. Is compiling them as modules necessary to get them to work or is it okay if I compile them directly into the kernel? Speaking of which, what is the benefit of compiling them as modules instead of compiling them directly into the kernel?

----------

## stim

 *Shining Arcanine wrote:*   

> My university has a VPN which it requires wireless users use to be able to connect to any remote port other than port 80. When I had Windows, I could install a Windows client that the university provided that would do this connection for me. Now that I am using Gentoo Linux, there is no client provided by my university, so I am on my own. I spoke to the people in charge of my university's wireless network and they told me that if I am able to use Linux, I am able to provide my own support. :/

 Yes, I've had this kind of response before too. Did they at least tell you (or do you know) what type of VPN it is? PPTP/Cisco/L2TP/OpenVPN...?

 *Shining Arcanine wrote:*   

> Anyway, I was banging my head trying to get it to work. I have kvpnc installed and I have followed all of the guides that were provided the local Linux Users Group for connecting to the VPN, but their guides were meant for Ubuntu Linux, which uses Gnome, so they were not much help. After doing some more searching, I found the following page, which had some suggestions on additional things to compile into my kernel:
> 
> http://pptpclient.sourceforge.net/howto-gentoo.phtml
> 
> I compiled them into the kernel. I am off campus at the moment, so I am trying to connect to the VPN from an external IP, which might not be allowed as Kvpnc is crashing on connection attempts that I make, which did not happen on campus.

 I wouldn't use Kvpnc at all if I were you. At least, I never got it working. Even if it doesn't crash, it doesn't set up a connection properly for me and actually I've had many problems (I've tried PPTP, Cisco and OpenVPN with Kvpnc at different times - none of them worked but all worked from the command line).

 *Shining Arcanine wrote:*   

> That is my problem in summary. If anyone has any tips they could provide to me, it would be appreciated, although I do not expect much assistance considering that I omitted which university I attend for personal reasons. Anyway, I do have a question that I hope people here can answer. The page at sourceforge suggests compiling alot of stuff as modules. Is compiling them as modules necessary to get them to work or is it okay if I compile them directly into the kernel? Speaking of which, what is the benefit of compiling them as modules instead of compiling them directly into the kernel?

 Compiling into the kernel is fine. (One of) The benefit(s) of compiling as a module is that you don't need to restart your system to use the new compiled functionality - just do a 

```
modprobe <modulename>
```

and you're good to go.

Unfortunately you haven't given enough information as to your actual problem, e.g. what type of VPN, what is the error message or what happens. The howto-gentoo file you listed above was useful for me when setting up my PPTP connection. One thing you might want to be wary of whichever client you use is the routing that is set up. For me, the clients set up a new network node/device (such as ppp0), but didn't change the routing table to direct any traffic through it. So even if I connected properly, I still wasn't using the VPN.

----------

## Shining Arcanine

The university VPN is a PPTP VPN using Microsoft CHAPv2 according to the network people. It requires at least 40bit encryption (although other sources say 128bit). The error is that the remote modem is hanging up.

Anyway, thanks for the information. It was much more than I expected anyone to provide.  :Smile: 

----------

## Shining Arcanine

I am on campus now (which means any moderator that wants to snoop to see what university I attend most likely can).

Here is the exact error message that I am getting from kvpnc:

 *Quote:*   

> Remote modem has hung up. Connection was terminated.

 

----------

## Shining Arcanine

I have an update. I just did:

 *Quote:*   

> /usr/sbin/pppd pty "/usr/sbin/pptp <pptp server> --nolaunchpppd --debug" +mppe-128 user "<username>" password "<password>" noauth persist nodetach debug
> 
> using channel 14
> 
> Using interface ppp0
> ...

 

The terminal waits for pppd to finish (likely never until I stop it), I open another terminal tab and ssh begins to work. Now to figure out why kvpnc could not do this. :/

----------

## stim

 *Shining Arcanine wrote:*   

> The terminal waits for pppd to finish (likely never until I stop it)

 I use pon and poff, but I think you are right that pppd doesn't quit until the connection is closed.

 *Shining Arcanine wrote:*   

> Now to figure out why kvpnc could not do this. :/

 Good luck! As I said, I've never been able to make kvpnc work no matter what I tried - but for me, I think I needed an option which kvpnc didn't support (i.e. I had to manually change the configuration file, but even then it wouldn't work though kvpnc but it would work from the command line).

----------

