linux
Setting up IPv6 connectivity for my home LAN and my laptop
Submitted by soccerfiend on Wed, 2014-01-15 22:10Our ISP has been saying that they will be rolling out a trial of IPv6 for more than 3 years now. Since this does not appear to be forthcoming I decided instead to make use of an IPv6 tunnel.
This tunnel behaves in much the same way as a VPN tunnel. You use IPv4 to connect to an endpoint, then use IPv6 addresses on the tunnel virtual interfaces. I used the Hurricane Electric tunnelbroker.net for my home IPv6 access, and a sixxs.net AYIYA tunnel for my laptop when away from home. I chose the AYIYA for my laptop since it is NAT friendly and is a better choice if your IPv4 address changes regularly. Both services are free.
Since I have a simple Linux machine as my main router this was actually a straightforward process. If you have a router that supports IPv6 tunnels, this can be even easier. In my case I had to setup the tunnel interface in /etc/network/interfaces (this is a Debian install, this should be the same for Ubuntu). The actual IPs have been obfuscated):
address 2001:a:b:c::3
netmask 64
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
address 2001:aaaa:b:cccc::2
netmask 64
endpoint 216.218.226.238
local 1.2.3.4
ttl 255
gateway 2001:aaaa:b:c::1
Connecting to ProXPN with Linux
Submitted by soccerfiend on Tue, 2013-05-14 19:49I recently heard about the VPN service from ProXPN. Since they were using OpenVPN under the hood I thought that it would be pretty straightforward to get running on my Ubuntu laptop (running 12.10 at the time of writing this). I have Vyper VPN (also using OpenVPN) working on this exact same configuration.
It turns out that officially there is no support for Linux, and the only downloads were .dmg (OsX), and .exe (windows)files. This was not looking good.
What I did first was to use 7zip to extract the contents of the downloaded .exe file. In the extracted folder was a folder called "config". In this folder was the .ovpn config file, was well as a folder called "ssl" which contained all of the required certs:
- ls config/ssl
- ca.crt client.crt client.key
With this information I was able to build a command line to connect to the ProXPN service. The only two missing pieces was an auth.txt file containing my ProXPN username (an email address) and password. This is the same username and password you used to register with them.
Mounting Virtualbox Shared Folders in Linux
Submitted by soccerfiend on Wed, 2012-05-30 10:02Shared folders are pretty easy to access. It turns out that is also pretty easy to do under Linux as well.
- sudo mount -t vboxsf -o umask=000 sharename /path/to/mount/point
The only catch is that you need to create the mount point first, just like most other file systems.
Connection issues with recent Samba versions and the DNS-323
Submitted by soccerfiend on Sat, 2012-02-04 15:17I was trying to connect to my DNS-323 from my laptop running a recent version of Ubuntu. When I attempted to map a share I received the following error.
Server requested LANMAN password (share-level security) but 'client lanman auth' is disabled
tree connect failed: NT_STATUS_ACCESS_DENIED
The solution is to put
- client lanman auth = Yes
in the local (client) smb.conf file.
Setting the CPU Frequency Govenor from the Command Line
Submitted by soccerfiend on Tue, 2011-11-15 10:34Most modern processors support some level of frequency scaling, that is they change the speed or frequency that they are running at in order to reduce energy consumption. You can usually change the frequency with a GUI app but what happens if there is no GUI running (on say a server). The command is called cpufreq-set. You can get details (like processor statistics and current governor in use. Both of these are provided by the cpufrequtils package which you can just apt-get or aptitude install
The problem is that cpufreq-set only sets one core or CPU at a time. On a dual or quad socket this could get quite tedious. Fortunately there is an easy solution.
- for each in `cat /proc/cpuinfo |grep processor |cut -f 2 -d \:` ;do sudo cpufreq-set -c $each -g performance ; done
What I do is run a small little bash script that iterates over all the CPUs and sets the governor to one set as a parameter to the script.
- #!/bin/bash
- # Wrapper to easily set the CPU Frequency Governor
- # Check that a valid governor is set
- GOVERNOR=$1
- USAGE="This script requires a CPU governor as an argument, which should be one of: conservative, ondemand, userspace, powersave, performance
- For example: cpuscale.sh ondemand"
- if [ "$#" = "0" ]; then
- echo "$USAGE"
- exit 1
- fi
- # Creating an array with each of the CPUs numeric ID
Fixing :perl: warning: Setting locale failed." errors on a Debian or Ubuntu system.
Submitted by soccerfiend on Sat, 2011-08-13 11:51The short short version is that I run the following four commands in sequence:
- export LANGUAGE=en_CA:en
- export LANG=en_CA.UTF-8
- locale-gen en_CA.UTF-8
- dpkg-reconfigure locales
Of course this example is specific to a Canadian English UTF-8 system. In the US, the language might be defined as something like en_US.UTF-8.