About jontas

I like to make things that people find useful.

Adding a OpenVPN client on ubuntu 10.04

First the certificate (key) should be created on the server.

cd /etc/openvpn/easy-rsa/
source vars
./pkitool hostname

Copy the certificate files to the client
* /etc/openvpn/ca.crt
* /etc/openvpn/easy-rsa/keys/hostname.crt
* /etc/openvpn/easy-rsa/keys/hostname.key

Then the client should be setup

apt-get install openvpn
cd /etc/openvpn
cp /usr/share/doc/openvpn/examples/sample-config/client.conf client.conf

Edit the client.conf file (edit all that you need to fit your config, the following are those I recommend):
The fix for Vista I add (commented out) since I am lazy and usually just copy a old config file to the next client

remote my.domain.com 1194
 
# a separate .crt/.key file pair
# for each client.  A single ca
# file can be used for all clients.
ca ca.crt
cert clientName.crt
key clientName.key
 
#fix for vista being stuid...
;route-method exe
;route-delay 2

Restart OpenVPN on the client:

 /etc/init.d/openvpn restart
 * Stopping virtual private network daemon(s)...                                
 *   No VPN is running.
 * Starting virtual private network daemon(s)...                                
 *   Autostarting VPN 'myVPN'                                         [ OK ]

Same as with the server, the above means that is went well, a [fail] means that the logs should be read for details.

A word of caution: [ OK ] only means that the OpenVPN was started ok – no errors in config etc.
There might still be issues with firewalls, wrong hostname (to the server) etc.
Check ifconfig and ping the server to make sure it is working.

Installing OpenVPN (server) on ubuntu 10.04

This is a quick note on how to install OpenVPN as a Ethernet tunnel (not a bridge) on ubuntu 10.04

install

sudo apt-get install openvpn

Server Certificates

First, copy the easy-rsa directory to /etc/openvpn.

sudo mkdir /etc/openvpn/easy-rsa/
sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-rsa/

You may also wish to adjust permissions in the easy-rsa directory to allow the current user permission to create files.

sudo chown -R $USER /etc/openvpn/easy-rsa/

Next, edit /etc/openvpn/easy-rsa/vars but make sure you adjust at least the following values to values make sense to you:

export KEY_COUNTRY="SE"
export KEY_PROVINCE="Blekinge"
export KEY_CITY="Karlskrona"
export KEY_ORG="My organization"
export KEY_EMAIL="vpnhelp@example.com"

Enter the following to create the server certificates:

cd /etc/openvpn/easy-rsa/
source vars
./clean-all
./build-dh
./pkitool --initca
./pkitool --server server
cd keys
openvpn --genkey --secret ta.key
sudo cp server.crt server.key ca.crt dh1024.pem ta.key /etc/openvpn/

Server Configuration
Lets start by copying the example config.

sudo cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/
sudo gunzip /etc/openvpn/server.conf.gz

Edit /etc/openvpn/server.conf changing (at least) the following options (change to values that make sense to you):

#Change the VPN subnet address to one that makes sense to you (and don't collide with any other net)
server 10.9.0.0 255.255.255.0
#If you wish the computers on the VPN to be able to connect to each other then uncomment
client-to-client
# You can uncomment this out on
# non-Windows systems.
user nobody
group nogroup
#If this is uncommented then a separate log will be written for OpenVPN (If both log lines are uncommented, then syslog is used)
log-append  openvpn.log
#To enable per client configurations uncomment:
client-config-dir client-configs

Restart the VPN:

/etc/init.d/openvpn restart

If the server failed to start:

/etc/init.d/openvpn restart
 * Stopping virtual private network daemon(s)...                                                                                                 
 *   No VPN is running.
 * Starting virtual private network daemon(s)...                                                                                                 
 *   Autostarting VPN 'server'                                                     [fail]

Then you should check out the log (either syslog or the log you set in the config file) and solve the issues.
It should look like this:

/etc/init.d/openvpn restart
 * Stopping virtual private network daemon(s)...                                                                                                 
 *   No VPN is running.
 * Starting virtual private network daemon(s)...                                                                                                 
 *   Autostarting VPN 'server'                                                     [ OK ]

Makerbot: Connecting the stepper motors

By testing the stepper motors and the heater from the ReplicatorG control panel I found I had connected the X and Y motors to the wrong controllers.

The correct way to connect them is:

  • Z: This is the motor that is on the top of the MakerBot
  • X: This is the motor that is at bottom of the MakerBot
  • Y: This is the motor that is on the X-Stage (the moving table inside the MakerBot)

Cheat sheet to test them:

  • Z-: This should move the extruder down towards the build surface
  • X+: This should move the XY-Stage towards the covered side (the one where the electronics are on the other side)
  • Y-: This should move the build surface towards the M on the front

First challange; ReplicatorG said “Extruder board: Null version reported! Make sure the extruder is connected and the power is on”

The first challenge was that no green LED’s lit up on either the motherboard, the stepper cards nor the extruder.
All I could see was a red flashing light.

In short, don’t get confused by the error message. The power to turn on is not at the extruder, but at the motherboard.
There is a power switch on the lower left part of the motherboard – this should be turned on.

If you are getting this error when the power is turned on there, then something else is the issue 🙁

When all works well you will get a message about the motherboard version and extruder version in the text box below the main window (where the build area and model is shown)

Plastruder MK4

The plastruder is possibly the most important part of the MakerBot.
This had the most pieces, the longest instruction and the most images (and it would benefit the wiki if some of the texts moved closer to the images) – but enough on that.

Hint: Twist the wires from the thermistor before cutting them to length.

Parts:


Assembly:
plastruder construction
plastruder construction

plastruder construction

Having put the barrel back together. Hint for others, put the nut next to the PTFE heater barrier. Remove the barrier, secure the nut and then put on the Nichrome wire, it is a lot easier than the method suggested in the wiki (putting on nichrome, insulators and removing the PTFE barrier and putting in the big washer).



plastruder

Only remains to run the wires and hook them up

XY Stage Installation

The wiki says: *TIP* If the rods are too short they will move back and forth causing loss of resolution and additional noise. If this is the case for you, just insert something between the end cap and the rod to help compress it.
Well I put one of the M3 nuts in each of the two caps to press the rods into position.

Some images:

The parts needed for this laid out


xy-stage installation construction
XY stage installation

Assembled and done.