Planet HantsLUG

Syndicate content
Planet HantsLUG -
Updated: 6 min 20 sec ago

Adam Trickett: Bog Roll: Squeeze

Sat, 26/04/2014 - 17:22

Today I completed the last migration of a Debian GNU/Linux system from version 6.x (aka Squeeze) to version 7.x (aka Wheezy). One system was this server, which I migrated to a new hosting platform, today's migration was an Viglen MPC box that someone was using when the upgrade was initially due.

The upgrade was painless (as usual) and everything on the new box is working perfectly as expected.

Categories: LUG Community Blogs

Adam Trickett: Bog Roll: BigV

Fri, 25/04/2014 - 18:32

My hosting provider Bytemark started to develop a new virtual server technology some time ago. It's marginally cheaper and marginally more powerful than my current solution. It has many scalability advantages as well but they are not as important to me as the fact I was due to upgrade my existing server and migrating to a new box has many advantages over an in situ upgrade.

I signed up to their free trial and was instantly impressed by both the technology and their customer support. I know there are other good companies so in no way do I want to criticise them, but Bytemark are very good people to work with.

I built my new Debian box, installed the packages I wanted and ported the bits over from the old server over a few evenings. It took only a few hours, and in the process I was able to improve some of the layout and such of the new box and try out newer packages.

This week I updated the DNS records updating the box names and other than forgetting to switch my email server from listening local to listening to the network everything went very well. All that happened was email was backed-up for a few hours before it all arrived.

I've now stripped the old box down to it's minimal running configuration, deleted all my files, and I'm now filling the filesystem up with random junk before deleting the junk and switching the box off so that it can be returned to Bytemark.

Categories: LUG Community Blogs

Steve Kemp: I've not commented on security for a while

Tue, 22/04/2014 - 22:14

Unless you've been living under a rock, or in a tent (which would make me slightly jealous) you'll have heard about the recent heartbleed attack many times by now.

The upshot of that attack is that lots of noise was made about hardening things, and there is now a new fork of openssl being developed. Many people have commented about "hardening Debian" in particular, as well as random musing on hardening software. One or two brave souls have even made noises about auditing code.

Once upon a time I tried to setup a project to audit Debian software. You can still see the Debian Security Audit Project webpages if you look hard enough for them.

What did I learn? There are tons of easy security bugs, but finding the hard ones is hard.

(If you get bored some time just pick your favourite Editor, which will be emacs, and look how /tmp is abused during the build-process or in random libraries such as tramp [ tramp-uudecode].)

These days I still poke at source code, and I still report bugs, but my enthusiasm has waned considerably. I tend to only commit to auditing a package if it is a new one I install in production, which limits my efforts considerably, but makes me feel like I'm not taking steps into the dark. It looks like I reported only three security isseus this year, and before that you have to go down to 2011 to find something I bothered to document.

What would I do if I had copious free time? I wouldn't audit code. Instead I'd write test-cases for code.

Many many large projects have rudimentary test-cases at best, and zero coverage at worse. I appreciate writing test-cases is hard, because lots of times it is hard to test things "for real". For example I once wrote a filesystem, using FUSE, there are some built-in unit-tests (I was pretty pleased with that, you could lauch the filesystem with a --test argument and it would invoke the unit-tests on itself. No separate steps, or source code required. If it was installed you could use it and you could test it in-situ). Beyond that I also put together a simple filesystem-stress script, which read/wrote/found random files, computes MD5 hashes of contents, etc. I've since seen similar random-filesystem-stresstest projects, and if they existed then I'd have used them. Testing filesystems is hard.

I've written kernel modules that have only a single implicit test case: It compiles. (OK that's harsh, I'd usually ensure the kernel didn't die when they were inserted, and that a new node in /dev appeared ;)

I've written a mail client, and beyond some trivial test-cases to prove my MIME-handling wasn't horrifically bad there are zero tests. How do you simulate all the mail that people will get, and the funky things they'll do with it?

But that said I'd suggest if you're keen, if you're eager, if you want internet-points, writing test-cases/test-harnesses would be more useful than randomly auditing source code.

Still what would I know, I don't even have a beard..

Categories: LUG Community Blogs

Adam Trickett: Bog Roll: Hardware Score Card

Tue, 22/04/2014 - 11:40

Over the years I've had quite a few computers, starting with a Commodore 64 which was an "out of box failure" and had to be replaced straight away.

The next computer I bought was a Dell that had zero defects on delivery, zero defects within it's 3 year warranty and zero defects after that - to the best of my knowledge it's still working if I were to take it out of storage and boot it up!

Next came a Dell laptop (re-manufactured) that had zero faults on delivery, zero faults within it's warranty period but since then the bezel has cracked and there are three dead pixels on the screen. Again like the desktop it's still working today many years after it finished active service.

Then we have a pair of Digital Networks UK desktops (one that I'm using today). Zero faults on delivery, both Iiyama displays failed with the three year warranty and the DVD-ROM on one died and its power-supply has been swapped long after the warranty expired.

Next I have another Digital Networks UK desktop (used as a server), it's had a power-supply fail under warranty, and after the warranty period: one hard disk; the power-supply and the case fan have had to be replaced. It's also been somewhat prone to overheating under full load most of it's life.

Finally I have a Novatech laptop, which had a dead batter shortly after the end of the it's one year warranty period. Which I should have realised by law that it should have been a two year warranty and as such should still have been a warranty swap... Otherwise the laptop has and is still fine.

Categories: LUG Community Blogs

Debian Bits: Debian welcomes its 2014 GSoC students!

Tue, 22/04/2014 - 10:39

We're excited to announce that 19 students have been selected to work with Debian during the Google Summer of Code this year!

Here is the list of accepted students and projects:

As always, you will be able to follow their progress on the SoC coordination mailing-list

Congratulations to all the students and let's make sure we all have an amazing summer!

Categories: LUG Community Blogs

Debian Bits: Debian welcomes its 2014 GSoC students!

Tue, 22/04/2014 - 10:00

We're excited to announce that 19 students have been selected to work with Debian during the Google Summer of Code this year!

Here is the list of accepted students and projects:

As always, you will be able to follow their progress on the SoC coordination mailing-list

Congratulations to all the students and let's make sure we all have an amazing summer!

Categories: LUG Community Blogs

Steve Kemp: I was beaten to the punch, but felt nothing

Sat, 19/04/2014 - 20:03

A while back I mented github-backed DNS hosting.

Turns out does that already, and there is an interesting writeup on the design of something similar, from the same authors in 2009.

Fun to read.

In other news applying for jobs is a painful annoyance.

Should anybody wish to employ an Edinburgh-based system administrator, with a good Debian record, then please do shout at me. Remote work is an option, as is a local office, if you're nearby.

Now I need to go hide from the sun, lest I get burned again...

Good news? Going on holiday to Helsinki in a week or so, for Vappu. Anybody local who wants me should feel free to grab me, via the appropriate channels.

Categories: LUG Community Blogs

Adam Trickett: Bog Roll: New Boxes

Thu, 17/04/2014 - 12:13

At long last I've decided. I've ordered a shiny new DNUK Deskstar, desktop PC to replace my current DNUK Workstar system which has reached the end of it's useful life as a front line system. The new box is at least four times better in every respect: it has four cores compared with one; 8 GiB of RAM instead of 2 GiB; ten times the hard-disk capacity (which is also faster) and a solid state drive; hardware virtualisation and a drastically superior graphics card. It's also a Intel based system, all my previous DNUK boxes have had AMD processors. It will cost more money than the system it replaces, but a system of similar price (accepting inflation) would not have been sufficiently faster or balanced to make it worth buying.

I've also started the process of migrating this server off the current Bytemark virtual server onto their new BigV platform. The new system is faster, more scalable and slightly cheaper. It also allows me a pain-free upgrade to the latest version of Debian.

Categories: LUG Community Blogs

Martin Wimpress: BIP IRC proxy

Wed, 16/04/2014 - 07:07

BIP is an IRC proxy that maintains a persistent connection(s) to a list of IRC channels. You can then point your IRC client to BIP each time you log in and playback the conversations that took place while you were away.

I've found bBIP to be so useful that I now maintain BIP for Arch Linux, although I now run my BIP proxy on Debian because my new VPS provider doesn't offer Arch Linux as an option.

Installing BIP

Installing BIP is simple for both Arch Linux and Debian.


I run BIP on Debian Wheezy with the backport repository enabled.

sudo apt-get -t wheezy-backports install bip sudo sed -i 's/ENABLED=0/ENABLED=1/' /etc/default/bip Arch Linux pacman -S bip systemctl enable bip Create a user

The next thing to do is create a username and password and BIP provides it's own utility for doing this called bipmkpw. Replace 'username' with whatever you want your BIP 'username' to be. This name has no relation to any IRC usernames so it can be anything.

bipmkpw username

Enter a password when prompted. The password will then be output as a hash. Make a note of both the hashed and un-hashed values somewhere, you will need them later.

Create a certificate

We don't want the username and password being sent as clear-text, so we will create an SSL certificate for BIP to use.

openssl req -new -newkey rsa:4096 -nodes -x509 -keyout bip.pem -out bip.pem

Move the certificate to /var/lib/bip

sudo mv bip.pem /var/lib/bip

Change ownership and permissions of the certificate to the user bip which was created automatically when the package was installed.

sudo chown bip:bip /var/lib/bip/bip.pem sudo chmod 600 /var/lib/bip/bip.pem Configure BIP

Here is example configuration for BIP. Copy it to /etc/bip.conf, modify it accordingly and then change the ownership and permissions.

sudo chown bip:bip /etc/bip.conf sudo chmod 640 /etc/bip.conf Example configuration # bip default config file. # Thou shoult change thy password ip = ""; # To connect a client to bip, try the port below, and # be sure to set the password to the value # specified in the network you want to connect to. port = 7778; # If you set this to true, you'll only be able to connect to bip # with a SSL capable IRC client. Be sure to generate a certificate # for bip with 'make cert' client_side_ssl = true; log_level = 3; pid_file="/var/run/bip/"; # This is where logs go. Channel and private messages will use that # configuration value as a prefix, and then log_format to determine # full log filename. log_root = "/var/log/bip/"; # Log format allows you to make log filenames depend on the log line's # attributes. Here's a list : # %u -> user name # %n -> network name # %Y -> 4 digit year # %m -> 2 digit month # %d -> 2 digit day # %c -> destination (#chan, privates, ...) #log_format = "%n/%Y-%m/%c.%d.log"; # Sets the frequency (in seconds) of log syncing (real write to kernel) #log_sync_interval = 5; # Makes bip send the log of each channel and privates while # you were not connected to the proxy upon connection. backlog = true; # enable backlog backlog_lines = 0; # number of lines in backlog, 0 means no limit backlog_always = false; # backlog even lines already backlogged # If blreset_on_talk talking on an irc network has the same effect of issuing # /bip blreset, meaning that stuffed logged before the command won't be read # back on backlog blreset_on_talk = true; # Network definition, a name and server info network { name = "freenode"; server { host = ""; port = 6667; }; }; network { name = "blitzed"; server { host = ""; port = 6667; }; }; # Configuration example with one user who connects to two irc networks # To use the multi-server feature: # - define the connections # - chose and setup a different login for each connection # on your irc client: # - Use the multi server feature of your client, the server being each time # the server where bip is running. In your client setup server password to: # username:password:connectionname # - do not store the password in clear here, use the bipmkpw util to generate # a hash # User structure is grouping information for a given user user { # The name in bip of the user # This is used by bip only name = "USERNAME; #BIP User account created with bipmkpw password = "00000000000000000000000000000000000000"; # the hash bipmkpw created ssl_check_mode = "none"; # These will be the default for each connections default_nick = "NICKNAME"; #IRC Nick default_user = "IRCUSERNAME"; #IRC User default_realname = "REALNAME"; #IRC Real Name admin = true; backlog_msg_only = true; # When true, # A user can have mutiple connections to irc networks. # define a connection: connection { name = "freenode"; # used by bip only network = "freenode"; # which ircnet to connect to # these will be sent to the real IRC server user = "IRCUSERNAME"; realname = "IRCREALNAME"; password = "serverpassword"; #can be commented out if not needed # Some options: follow_nick = true; ignore_first_nick = false; #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword"; # Autojoined channels: channel { name = "#cat"; }; # Join #cat channel { name = "#dog"; backlog = false; }; # Join #dog but don't backlog it. channel { name = "#pig"; key = "01nk01nk"; }; # Join #pig that has a password. }; connection { name = "blitzed"; # used by bip only network = "blitzed"; # which ircnet to connect to # these will be sent to the real IRC server user = "IRCUSERNAME"; realname = "IRCREALNAME"; password = "serverpassword"; #can be commented out if not needed # Some options: follow_nick = true; ignore_first_nick = false; #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword"; # Autojoined channels: channel { name = "#bar"; }; channel { name = "#foo"; }; }; };

If you require any clarification about what the configuration options do then man bip.conf is your friend.

Start BIP

Now that BIP is configured, it can be started.

Debian sudo /etc/init.d/bip start Arch Linux sudo systemctl start bip Client configuration

I use HexChat, but other IRC clients are available. I add a new Network to HexChat for each of the IRC networks I defined in /etc/bip.conf. The screen shot below shows how I configure a BIP network in HexChat.

Password format

The Password is the most important and confusing item. This is for BIP, not for any IRC network. Remember the unhashed password? That goes here but with a twist. The format for the password is:


Bipnetwork? What is that? It is from the following section of /etc/bip.conf on the server?

network { name = "freenode"; server { host = ""; port = 6667; }; };

A more practical example:

myuser:S3cr3tP@$$w0rd:freenode Conclusion

And that's it! We are now perpetually connected to IRC, can connect to BIP proxy from multiple devices in a completely transparent and seamless manner. Moreover, the logs for all channels are saved and automatically rotated on the server.

If you looking for an alternative to BIP, then try ZNC.


Categories: LUG Community Blogs