PPTP VPN on Ubuntu Jaunty Dies When Using Samba

Recently I began dual booting my laptop with Ubuntu 9.04 (Janty) to mess around with Linux again.  There were a few things that didn't work quite right with previous versions of Ubuntu (wireless card wouldn't work and sound wouldn't work without a lot of tweaking).

One thing that I really like about Ubuntu/Linux is the fact that it is relatively secure from viruses and all those popups online about your computer being infected with viruses and spyware.  It is also very stable and doesn't seem to slow down the longer you leave the computer on.

Another big plus is the cool Compiz Fusion desktop effects – ranging from 3D cubes, animations, and many other features.  While this is just "eye candy", when anyone else sees these features, they are intrigued and they all want those effects for their computer!

However, I have fallen on to one problem with Ubuntu 9.04 (Jaunty) that is somewhat of a problem for me – PPTP VPN and moving large files or big chunks of data.  Using the built-in Network Manager in Ubuntu, there are a few packages you need to install to allow you to use a PPTP VPN.  The neat thing about the way it is setup is that the network icon on your panel can be clicked – then there is a VPN menu in there and it is quick and easy to connect to a VPN connection.

To install the needed features to get a PPTP vpn to work, issue the following command:

sudo apt-get install network-manager-pptp

 After installing the PPTP items for VPN, you can then configure your VPN by left-clicking the network icon in your panel, go to VPN Connections, and then Configure VPN.  In there, you will setup your new VPN connection with all of the items you need.  One issue that was a problem previously was the fact that you couldn't disable EAP authentication.  In the new Network Manager, you can disable this feature.  I only select the one authentication method I allow for VPN and uncheck the rest.  Under the IPv4 settings, there is a Routes button.  In here, I ensure to check the "ignore automatically obtained routes" and "Use this connection only for resources on its network."  I then have to specify the route I want by clicking in each of the fields in the box above.  This will ensure that anytime I enter an IP address within that network range, it routes it over the VPN instead of the connection being attempted over the default route (regular Internet).

I then can connect up to the VPN and it works just fine!  However, I found a slight problem – the VPN will fail and disconnect anytime I attempt to transmit a large amount of information!  Specifically, when I attempt to use VPN to connect to a Samba server on the network, it fails.  I can open up the Samba share and see all the shared files/folders, but the moment I attempt to copy or delete a file on the share, the VPN would fail.  Every now and then, the VPN would also fail if I used the Terminal Services Client in Ubuntu to connect to a VNC connection on the network.  However, it does appear that I was able to use SSH fine through the VPN – but I rarely need that use versus the ability to move and transfer files.

After working on the problem for a bit, the error logs were showing the following when the disconnect happened:

Jul 31 10:20:16 Desktop pptp[5449]: nm-pptp-service-5440 warn[decaps_gre:pptp_gre.c:331]: short read (-1): Message too long

 After a little bit of tweaking using a manual method of making a PPTP connection, I discovered that the problem was the MTU (Maximum Transmission Unit) seemed to be too large.  When connecting to a VPN using the Network Manager, it sets the MTU at 1400.  The MTU on the Ethernet connection is 1500.  I played with the MTU/MRU numbers in a manual configuration file for a little while until I discovered that an MTU/MRU of 1250 was the highest I could set it.  If it Iset it at 1275, the connection would also fail when attempting to move data to a Samba share over the VPN.

So, needless to say, I am having to manually connect to VPN for the time being.  I'm surprised that the VPN Network Manager in Ubuntu will not allow you to set the MTU of the connection.  If this could be done, this problem would be easily resolved by allowing users to change it to what is the most stable.  Below I will illustrate the steps I used to get the VPN to work manually.

 First, you will need to open your chap-secrets file as the root user (/etc/ppp/chap-secrets).  Make an entry similar to the following:

USER     PPTP     PASSWORD     *

Ensure to set USER to the username for the connection and PASSWORD to the password for the connection.  PPTP says that it will be used on the PPTP connection and the * (asterisk) indicates that the username/password will be used for any PPTP connection you make to any server.  You can also change this specifically to the IP address or server where the connection will be made.  Now save and close the chap-secrets file.

The next file to change will be your options.pptp file (/etc/ppp/options.pptp).  If you use MPPE encryption, you will want to ensure to remove the hash sign (#) from in front of the appropriate command.  If you use 128-bit MPPE, remove the has in front of the "require-mppe-128" line.  Also, ensure that your configured authentication type is allowed.  In the configuration file, the default authentication types are all refused:

refuse-pap
refuse-eap
refuse-chap
refuse-mschap

After you have your settings updated, click Save and close the file.

Now, there is one more file you need to modify – this one you actually will need to create.

Go into your /etc/ppp/peers folder.  In there, create a new file.  You will have to have root access in order to get into this folder.  For simplicity, I would make it one word – maybe just VPN.  Now, here is a copy of the file I made.  I named mine VPN as well:

pty "pptp SERVER  –nolaunchpppd"
name USERNAME
remotename PPTP
file /etc/ppp/options.pptp
ipparam VPN
mru 1250
mtu 1250

Let's go over some of those settings.  The first line has SERVER in it.  Ensure this is changed to the IP address or fully qualified domain name of the VPN server you will connect to.  For the name line, ensure you change the USERNAME to the username you use to connect to vpn.  For the remotename line, PPTP is shown here.  This corresponds back to the /etc/ppp/chap-secrets file (remember where PPTP was put in?).  Lastly, the ipparam line, VPN is the name of this file you saved.  So, since I named mine VPN, it says VPN.  You can see also that I pushed the settings of the MRU and MTU to 1250 – which are the two lines needed to keep the VPN running stable.  Now, save and close this file.

You are all done with the manual method of a PPTP VPN connection!

In order to run the VPN connection, you will then run the following command as root:

pon VPN

Again, ensure VPN is the name of the file you saved in the /etc/ppp/peers folder with your connection settings.

After connecting to VPN, I bet you notice that nothing is working!  This now because you need to tell yoru computer what to route through the VPN.  This can be done by the following:

sudo route add -net 192.168.254.0/24 dev ppp0

Ensure you put in the network range that your VPN uses.  When I connect to VPN, I get a 192.168.254.x IP address – and I know that the network all is within that range.

If you want the route to be automatically be added when the connection is made, this can also be done.  This alleviates an extra command that has to be entered whenever you make a connection.

To have the route added automatically, navigate to your /etc/ppp/ip-up.d folder.  In there, create a new file called route-traffic.  Type in the following:

#!/bin/bash
route add -net 192.168.254.0/24 dev ppp0

Close and save the file.  Now ensure that it is executable by running:

sudo chmod 755 route-traffic

The file will then run whenever your VPN connection is created.

So, you are now fully connected to your VPN!  Now, to disconnect, enter the following command as root:

poff VPN

Again, where VPN is the name of the file you saved in /etc/ppp/peers.

This is definitely a long work-around for VPN, but once it is setup, it is just a matter of issuing the two commands to connect (or one if you made the route-traffic file), and the one to disconnect.  I am hoping that they will fix t he Network Manager to allow users to put in their own MTU levels sometime shortly.

Garden Update – 7/27/09

Time for a full garden update!

Let's start off with the front garden.  The front garden has been growing very well.  Two additional rows of greens beans were planted towards the center about three weeks ago and they are coming right along.  In addition, there is a row of corn right down the center (hard to see because the green beans are overtaking them!).  You'll also notice the addition of the bird netting has been used as fencing around the full area now.  The netting stands about five feet tall to keep the deer from getting into the corn and everything else.  The peppers just needed more head space to grow and with the corn growing, it was a matter of time before it had to be done.

Front Garden

Here is a closer look at one of the pepper plants.  There are about a half dozen peppers on each of the eight plants right now – and as they grow taller, they are putting on more flowers for more peppers!

Peppers

 Now let's go over to the grape arbor.  The Concord Seedless is doing very well and is growing along the top of the arbor already (not pictured).  The Flame Bunch grape has turned into a huge plant!  While the Concord Seedless only has one main trunk going towards the top, the Flame Bunch has several different branches that had to be tied together!

Grapes

Now to the driveway where there are two raised beds.  The first one is where the carrots were planted.  They are coming in well, but they are quite slow growing.

Corn

And here are the green beans in the newly created raised bed.  This bed is already full of green beans!  The plants were all taken from the area where the corn is planted in the picture above.  Green beans were originally planted here and then transplanted.  As above, there are still a few green bean plants that haven't been moved.

Green Beans

Along the side garden by the house, the corn is doing very nicely.  They were planted alongside the house and in any containers I could find.

Corn

How about the cucumbers!  The two cucumber plants have begun to grow together since they are running out of space on the chicken wire fencing.  I finally spotted a few small cucumbers that are growing!  I thought that every flower put on a cucumber, but I've found this isn't the case.  There are maybe two dozen flowers on each of the two plants, but only one or two cucumbers on each.

Cucumbers

And for the Roma tomatoes – the two plants are loaded with the little tomatoes!  They are beginning to ripen up so we'll have a bunch of them.

Roma Tomatoes

Now, for the ugly.  Some kind of fusarium wilt or verticillium wilt have taken over the Best Boy and Red Cherry tomato plants.  The Best Boy tomatoes have a good amount of large tomatoes on them though – so we at least are going to get something from them:

Best Boy Tomatoes

Unfotunately, the Red Cherry tomatoes are a castrophe.  One of them is still trying to survive, but this one has completely had it:

Red Cherry Tomatoes

A pretty sore sight and disappointing.  But, considering how much the gardens have grown this year, that is one very small thing compared to last year.  Last year we just had tomatoes and corn; this year saw a multitude of other veggies added to the garden and they have all yielded exceptionally well.

So far everything is looking great!  I just hope that the weather this year holds out a bit so the corn has time to fully mature.  If it frosts anytime before October 15-20, all the corn very well may be ruined.

Birth of a New Garden Box

Today saw the birth of the third garden box at our house!  I was contemplating from the moment I woke up this morning whether I should make another box.  This one is right next to the patio.  It is 8 feet by 4 feet wide and is one foot deep.

Patio Garden Box

What is in the box already?  Well, those would be the green beans.  I uprooted the green beans in the side garden where the newly planted corn was and managed to get the last six corn seedlings in that area – although the corn seedlings probably won't make it because they looked pretty sickly.

From the corn area, there were about 16 green bean plants that were transferred.  So where did the rest come from?  Well, the same day that we pulled up all the carrots out of the other box on the back driveway, I planted more green beans in there.  On Friday we planted more corn in that box because none of the green beans had germinated at that point.  Well, now about 30 of the 70 green beans germinated yesterday and today – and they were right next to the corn!  I didn't want to just waste the plants – so I also transplanted those into the new box as well.

The new box will hold about 50 green beans if I planted them 10 inches apart in all directions.  Some places say you can plant them six inches apart, but I'm giving them a bit more room because I've found that the more room you give them, the better they grow and the better harvest you get from one plant.

So far there are a total of 26 green beans in the new box.  There are another 20 green beans that just broke the surface in the old carrot box.  Once they start to put on at least a leaf, I will also dig those up and transplant to the new box.  That will then only leave room for four more green beans – already!  Pretty amazing how I built the box and it is going to be full a day later.

The box cost about $35 to built – if I include some scrap 2×2's and deck screws I had around the house to connect everything.  I purchased three 1x6x16 foot treated lumber at about $9.50 each.  This box has the same volume as the other box on the back patio – the other one is 2 feet wide by 16 feet long – and the new box is 4 feet wide by 8 feet long.

The new box definitely will give a lot more growing space!  Next year I am thinking that I may put the tomatoes in this area and then use the area behind the garage for green beans – since the tomatoes just are not doing well this year in their current spot behind the garage.

I am fully out of space now in the back yard – unless I build another 4×4 box right next to the garage but I doubt I will do that.

Onions & Corn + Tomatoes

A few things going on this week in the garden.  After picking that load of carrots, there were other veggies that needed attention.

Thursday we took off at 6 am to go to the in-laws house to check on the corn.  We also had about 150 new corn seedlings that needed planting as they had been in the small growers for over two weeks – not very good for them at all.  Some of them were beginning to yellow because they were quite rootbound.  We left at 6 am because we wanted to also go to Six Flags in St. Louis (pictures in the Picture Gallery) and I knew it would take quite a while to plant 150 new corn seedlings.

 Well, when we got there, I was quite depressed and had some sour disappointment.  The entire area was filled with weeds – you couldn't even see the soil there were so many weeds.  In addition to that, all of the corn was getting to the point where it was done because the silks were turning brown.  Unfortunately, the corn was less than five feet tall and there were very little ears on them.  This was pretty much a bust.  If you remember, only about 22 of the almost 200 seeds we planted down there sprouted – but all of the 42 transplants (seen below) all came up – but were very stunted.  It must be due to the lack of nutrients in the soil.

Disappointing Corn

So, we packed up all of the corn seedlings and put them back in the trunk.  I had no idea where we were going to plant them – but it sure was a waste that they all the seedlings grew and now they were going to be thrown out (63 out of 65 Peaches & Cream sprouted and 89 of the 96 Sugar Dots sprouted).

At the theme park, I didn't want the seedlings to sit in the car, so I put them out on the trunk of the car.  If they were left in the car, they would have burned up.  At least the visitors were all nice and no one did anything to the plants on the trunk during our stay.

On Friday after work, it was time to figure out where to plant the corn.  Well, none of the green beans in the area we had the carrots came up.  So I opted to put some in there.  Although they were planted a bit too close, I wanted to try to get as many in as I could – and I knew this soil had plenty of nutrients in them.  The container is two-feet wide, and I planted three rows of them.  So, we put in in a 13 x 3 planting of Sugar Dots (39 total):

Corn in Planter

As you can see, the bird netting is still over the top of the container.  When the corn grows to be taller, I'll have to replace this and put up the full height of the bird net fencing all the way around the box to keep the deer out.  We have a big problem with the deer eating everything around here – just ask our naked columnar apple tree out front that has had all its leaves bit off twice!

After planting these, the other spot to plant them in was next to the house – where the peas and onions were.  I had just planted more green beans in this area about a week prior – and again, only about 16 of those 40 green beans came up – again – very disappointing.  So I moved all of the green beans closer to gether.  My wife pulled up all of the onions – and to my surprise, they must have been ready because the roots just fell off of them when they were pulled out.  In all, there was just over 11 pounds of onions.  We had about 36 white onions and 26 yellow onions.  It is pretty interesting though that the white onions only weighed an ounce more than the yellow ones – even though there were 10 more white onions over the yellow onions!  I guess next year I'll know to only plant the yellow onions.

Onions

So, in the area next to the house, we were able to plant three rows of Peaches & Cream corn in rows of 16 – so that was another 48 corn seedlings used (up to 87 now out of the 152 seedlings).

Lastly, I then planted some corn down the middle and in areas where green beans didn't come up in the front garden.  I was able to fit another 24 there (that makes 111 seedlings now!)

Well, today I went to the local garden store and purchased some more PVC materials.  Now that there were three rows in the side garden, I had to change the PVC piping a little bit – from two rows to three.  So, I got all of that done:

PVC Piping & Container Gardening

Hmmm – what are all those buckets in the pictures?  Welp, on the way back home from the garden center, I had a light bulb lit up in the brain and I thought – last year I put the corn between the two landscaping areas between the garage and house (landscaping area next to the garage and last year the garden was also landscaping).  So, why not fill up some containers and put the corn in there!  So I went to another compost facility today that is just right next to the other one.  They don't have a gate like the other place does to keep people out – and there was a worker there.  The worker led me to a pile of compost that had already been screened!  Just perfect!  So next year I'll know where to get the compost from.

It took me two trips to fill up all of the containers.  I was then able to finish the last 15 of the Peaches & Cream corn (126 seedlings now).  Then I had enough to put 20 more Sugar Dots in the containers (146 seedlings!).  Wow, so out of the 152 corn that was planted, only six of them didn't have a home.  That is pretty good – and if all 146 of those come up, we'll have plenty of corn!  The Sugar Dots corn also will put on two ears if conditions are right – so I'm hoping that they will put on two ears with the better soil – although they were root bound in those little growers for two weeks.

OK, all done with the corn and PVC updates.  Here are a few more pictures from the garden.

The first photo is one of the Better Boy tomatoes.  Although the plant seems to have put on quite a few large tomatoes, something seems to also be killing the tomato plant.  As you can see below, almost all of the leaves on the plant are all dead and dying – except for the very top:

Better Boy Tomato

The cherry tomato plants are putting on some small ones.  I've eaten a few right off the vine and they are good!  But, these tomato plants also have a problem of their own – they were very long and stalky:

Cherry Tomato

And lastly, the cucumber plants.  These plants have some HUGE leaves on them and at least a dozen flowers on each of them.  None have begun to produce a single cucumber yet – so I'm still crossing my fingers that we'll have some.

Cucumber Plant

Carrots & Peppers!

My wife picked some green beans on Monday and also came across two peppers that needed picking.  Well, one of them was ready but the other one still had some growing to do:

California Wonder Peppers

I glanced out into the garden and there are a lot of peppers that are on the eight plants.  There are at least two dozen with varying degrees of coming along – be it a small pea size right now or a large 1-inch or more size.

Now onto the real bounty of this blog – carrots!

Tuesday after work I decided that it was time to check on the carrots.  I noticed a half dozen or so carrots sticking their orange crowns out from the soil.  I picked those and thought I might as well check one that wasn't above the surface – just to see how they were.  Well, after seeing that one as well, I decided it was time for them all to come out!  Here is a picture of just 1/4 of the carrots pulled out and the accompanying location they were pulled from:

Carrots

Carrots

Carrots

After they were all pulled and my wife cut the tops and bottoms off of the carrots, we had just under 18 pounds of carrots!  Not too bad from only about 1/3 of a pack of carrots that were $1.  If you were to buy these in the store, it would be over $20 worth of carrots.

They took a few hours to fully clean and get all the dirt off.  We put the small ones in the fridge to use with veggie dip and then filled four gallon-sized ziplocks with the rest.

Washed Carrots

Big Changes in the Garden

Well there have been a lot of big changes in the garden this week!

 First, we'll start out with a bowl of tri-star strawberries that my wife picked – I let her take over the strawberry patch since she's the strawberry girl.  The past few weeks have seen a remakable increase in the size of the strawberries – not to mention the quantity.  Now that the roots of the plants are more settled, the size and quantity has increased.

Bowl of Strawberries

After the weather cooled back down in the 70's last week, the peas decided to put on more!  So today (Thursday) and a few days ago (Tuesday), I figured it was time to pull the peas down.   Between the two days, there was just about a pound of peas picked.  On Tuesday, I took these nasty pictures of the peas:

Peas with Powdery Mildew

Peas with Powdery Mildew

What is all that stuff??  At first, I thought maybe it was some paint that made its way over from the neighbor's house because I heard they were re-painting. But, after touching one of the leaves, the stuff started to come off.  This is called powdery mildew – and it is some yucky stuff.  It stinks and really creates a dusting when shaken like drywall dust.  So, Tuesday all of the peas behind the garage were pulled out and today I just got done pulling all of the peas out by the house.  Now, there is quite a bit more room in the bed where the onions are:

Onions

I also took the opportunity to update the PVC irrigation system in this area.  Where the peas were along the fence, there was another PVC pipe running the length.  Now, I've simply capped that section off so no more water!

PVC Irrigation System

Now for a few more pictures of some items.

The two cucumbers are doing well.  They are already up to the end of the 2-foot chicken wire fencing – so I guess I'm gonna have to bend them over to the wire now:

Cucumbers

The cherry tomato plants are not doing well – but there have been five small cherry tomatoes pull off of the vine so far.  Here is one showing its really stalky figure:

Stalky Cherry Tomato

And here is one of the Best Boy tomato plants.  There are quite a few large tomatoes on it:

Best Boy Tomato Plant

And lastly – the corn that will need planting.  About 89 of the 96 Sugar Dots came up over a period of six days.  The Peaches & Cream corn did exceptional.  Within five days, 63 of the 65 have all sprouted.  The Peaches & Cream are on the left side of the photo and the Sugar Dots on the right:

Corn Sprouts

Now we just need to figure out when we can get down to the in-laws house to get these planted!

That is all for now on the garden front.

Carrots & Corn

Yeaterday it rained all day long – a continous rain that really watered everything very well.

 Today I got out in the garden a bit and picked another 2 pounds, 2 ounces of green beans.  So far, about 34 of the 70 green beans have sprouted.  This is just about the same percentage of green beans that came up the first time around (close to 50%).  So I opted to reseed in the places where the second batch of green beans didn't come up.

After that, I took a quick stroll along the back of the garage and there are a huge number of tomatoes coming up!  The Best Boy tomatoes have at least two dozen or more tomatoes on each of the two plants and the Roma tomatoes have at least three dozen on the two plants!  Again, the Red Cherry tomatoes are not doing nearly as good as what they have in the past, and there were only four or five clusters of tomatoes on each of those two.  The two cucumber plants have about six flowers on them each.

The Sugar Dots corn planted about a week ago is doing very well!  Out of the 96 plants, 89 of them have sprouted and come up!

Corn Seedlings

You'll notice in the picture that there is another planter to the left that I mostly cut out of the picture.  Friday I went to the local gardening store and purchased a package of Peaches & Cream corn.  It seems this must be a pretty popular variety because this was the only variety of corn that had the large package of seeds gone  – and there were very few of the small packets of seeds.  There were 65 seeds in the pack so I planted all of them.  Since Sugar Dots is no longer available locally, I am going to experiment with another variety that can be purchased locally and see how it compares.  Sugar Dots is a very good corn and I've grown it for about five years – and it also has the added benefit of putting on a smaller second ear of corn – something most other varieties don't do.  So, plant one stalk of corn – get double the harvest from it!

As I was watering the carrots the other day, I noticed one carrot was just peeking the surface of the box.  To me, that meant that it was ready to be pulled out.  Indeed it was!  A very nice-sized carrot.  This is the Burpee A#1 variety.

Carrot

You'll also see in the left side a small red cherry tomato that was picked.  There is another one hiding under the carrot's leaves – but those were the first two tomatoes of the season thus far!

What a Weather Change!

Wow, the weather has completely done a 360 in our area!  Last week – up including Saturday – the temperatures were over 90 degrees with a heat index over 100 each day.  This week – started on Sunday – the temperature really has dropped!  Sunday was in the lower 80's and the past three days have been between the high 60's to mid 70's.  Today it only got to about 69 degrees.

I've also got more pictures!  A few days ago I planted another 96 Sugar Dots corn.  I'm hoping most of come up so they will be transplanted into the in-laws garden.

Planted Corn

I also took more pictures around the garden today.  I harvested exactly two pounds of green beans today!

Green Beans

While harvesting those, I noticed that some of the green beans that were planted on Sunday have alread sprouted!  That is quite surprising that it only took four days.

Sprouted Green Beans

After seeing those, I also noticed a pepper plant with several small peppers growing!  Looks like just on this one plant, there are at least seven on it!

Peppers

Look at this nice flower that came from one of the onions planted!  I've never seen an onion flower before and it is quite neat.

Onion Flower

And some pictures of the tomatoes.  Here is a group of roma tomatoes.

Roma Tomatoes

And a group of Best Boy tomatoes.

Best Boy Tomatoes

With a previous blog post, I had mentioned that some cucumbers were coming up.  Well, I was actually mistaken and those were some kind of vine-like weed.  I did discover that two of the cucumber plants came up – and I took a photo of one here with a few flowers beginning to form:

Cucumber

And lastly, the sorry potato plant in the experimental potato bin.  I filled the bin up with another five-gallon bucket of dirt and then put some leaves over the top to help keep the moisture in.  You can see a lot of dead and withered leaves, but on a bright note, it does appear there is some new vegetation growing in the bottom right corner.

Potato Bin