I’m confused.

April 30th, 2008

Could someone please tell me why, around 5pm every day for the last couple of weeks, my wireless laser mouse stops working when it’s on the mousemat, but if I take the mousemat away, and use the mouse directly on the desk, it works fine…

I could understand if it just decided it didn’t want to work on the mousemat, or didn’t want to work at certain times, but specifically at a time, and specificaly on the mousemat. It’s confusing, and REALLY annoying.

Setting up networking on an ubuntu server

April 14th, 2008

Ok, by popular demand (aka ompaul) I’ve decided to do a mini-howto on setting up networking on an ubuntu server, for those who are new to it.

In Ubuntu itself, when you install the desktop version, you get a nifty little tool called “Network Manager” (you may have noticed the icon, espescially if you have wireless) which pretty much does everything for you. However, if you’re using the server, without a GUI then this isn’t generaly available.

So, where to start?

It really depends on your network setup, you need to know a few things about your network before you start this.

The first and most important question you need to find out is whether there is a DHCP server on your network that will assign you an IP address. If so, your networking setup is very very simple, so I’ll start off with that.

Networking with an available DHCP server

When you have a DHCP server available on your network, things are made a lot simpler. Cut short, a DHCP server sits on your network and hands out configurations to the different computers that ask for them. I won’t go into detail, but, generally you’ll find these on small home networks (your router will generally work as a DHCP server, which is why you (usually) magically find your way onto the internet when you plug yourself into a network with a router on it)

First of all, find out whether you actually already have an internet connection. I’ll assume for now that you have a keyboard and monitor hooked up to the computer you’re setting up as a server, and have logged in as a user with sudo rights.

Type in the command “ifconfig” (without the quotes) and you should hopefully see something like this:-

mez@stupor:~$ ifconfig

eth0      Link encap:Ethernet  HWaddr 00:16:3E:7F:AC:B2
inet addr:212.13.30.94  Bcast:212.13.30.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:3576458 errors:0 dropped:0 overruns:0 frame:0
TX packets:1886783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:836607596 (797.8 MB)  TX bytes:291514569 (278.0 MB)

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
RX packets:73611 errors:0 dropped:0 overruns:0 frame:0
TX packets:73611 errors:0 dropped:0 overruns:0 carrier:0
UP LOOPBACK RUNNING  MTU:16436  Metric:1
collisions:0 txqueuelen:0
RX bytes:15252378 (14.5 MB)  TX bytes:15252378 (14.5 MB)

The important bit we see here is the block of text starting with “eth0″ and espescially the line

inet addr:212.13.30.94  Bcast:212.13.30.255  Mask:255.255.255.0

This generally means that the computer already has an IP address! yay!

Next, try the command

ping google.com

Hopefully, you’ll get back a response saying something along the lines of

PING google.com (64.233.187.99) 56(84) bytes of data
64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=1 ttl=245 time=100 ms

If so, you have a working internet connection! Go you! you can now start using your computer on the internet (though the IP address given above might only be accessible from an internal network, depending on your setup - going into howto get this IP available on the internet proper is beyond the scope of this blog post)

If not, you’ll get one of two errors, either a “no route to host” or a “cannot resolve google.com”.

The first issue is a complex one, which again, is beyond the scope of this article (though feel free to email me to ask questions - or catch me on IRC - I will *try* to answer them)

The second one generally means that you do not have a nameserver setup.

Open DNS is a project that provides Accessible DNS resolvers for the whole world to use. More information can be found out about OpenDNS here

For now however, lets open up your DNS resolver settings

sudo nano /etc/resolv.conf

This file should be edited to contain the following lines only

nameserver 208.67.222.222
nameserver 208.67.220.220

Hit Ctrl + O then enter, then Ctrl + X to get back to your command prompt.

Try pinging google again, and hopefully it should work. If not, something went wrong somewhere, again, try emailing me or poking me on IRC.

So, what if you don’t have an IP address?

Well, assuming that you DO have a DHCP server running on your network, lets first of all check that we have a working interface on our system

ifconfig -a

You should hopefully see a couple of lines here, one starting with “lo” and another starting with “eth0″ (or similar) - remember this name

Now, open up your /etc/network/interfaces file (sudo nano /etc/network/interfaces) and make sure it contains the following

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Assuming that it does, we should be able to do the following

sudo ifup eth0

Which will (hopefully) bring the interface up. Go back a step if you cannot resolve google.com when trying to ping it. You might have to setup a resolver (though your DHCP server should provide these details for you!)

Voila! hopefully you now have a working network interface

Networking without an available DHCP server

Now, here is where things get more interesting. To be able to setup a network without having a DHCP server readily available, you need to know the following

  • The IP address that will be assigned to your host
  • The netmask for the IP addresses being used
  • The default gateway’s IP address (usually the IP address of your router)

It may differ how you get this information, however, I cannot tell you how to do so, I’d ask your network administrator if I were you (or your hosting provider)

So, I’m assuming here that you have the above details, are logged in at your machine and ready to go

I’ll only be brief about this setup, as a lot of the details are covered above.

First of all, make sure that your interface is down

sudo ifdown eth0

next, edit your /etc/network interfaces, replacing the information between < and > with
the information from above

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
	address <IP Address>
	netmask <Network Mask>
	gateway <Default Gateway>

So, you should have something like this

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
	address 212.13.30.94
	netmask 255.255.252.0
	gateway 212.13.30.1

Now head back to your console, and try

sudo ifup eth0

To bring your interface up. Hopefully, now, everything should be working (if not, go have a look at the DNS stuff above)

If you have any questions, feel free to leave me a comment here, or email me (martin AT sourceguru DOT net) and I will try and answer, though I make no guarantees!

Thus concludes Mez’s basic guide to server networking on ubuntu - I’ll try and add some more interesting stuff in a later blog post (IPv6, IP Aliases, etc etc)

Notes to self

April 11th, 2008
  • postfix reload does not change the listening interface settings for postfix
  • postfix really should listen on 127.0.0.1 if you are running mailman
  • when things go wrong, it’s usually your own fault

Buzzword Bingo

April 7th, 2008

https://lists.ubuntu.com/archives/ubuntu-irc/2008-April/000425.html

I’m ashamed of myself, I really am

A rose by any other name…

April 6th, 2008

In contrast to Martin F. Krafft and Daniel Silverstone, I personally, prefer to be called by my online nickname.

The reasoning behind this is simple. The name I (now) use for myself online actually comes from what most people in real life call me. The name “Mez” is a contraction of my surname “Meredith” (apparently) and is the name I go by as online, as well as in real life. Daniel also says that he finds it hard for his name to recognise “Kinnison” as someone trying to get his attention. I’m the opposite. I actually find it harder for my brain to recognise “Martin” as someone trying to get my attention, unless I’m in a situation where I’m expecting people to be calling me by that (usually with family, as they are the only people to call me by that name). I’m sure if you ever speak to my work colleagues, they’ll be able to confirm that my selective hearing only ever really picks up “Mez” :D

I however, unlike some people I know, have no problem with people calling me by my “Real” Name (though a definition of what is real is vague, and although I can’t find a citation, I’m pretty sure that UK law defines the name of someone as that of which they are called by and respond to (given name))

But it’s all good. If you want to get my attention though, I’d try shouting “Mez” at me. (and not “Meez or Mess, cause that DOES annoy me

Question

March 27th, 2008

In your opinion, should putting incoming mail in the right folders on an IMAP server dependent on say, the mailing list it corresponds to, be the job of the MDA or the MUA? (The “server” or the “client”)

*shakes head*

March 13th, 2008

There are some strange people on the internet, and most of the time, they can be annoying, but after this

* bod_ has joined #ubuntu-ops
<+Pici> bod_: How can we help you this morning?
<bod_> afternoon here ;~) im fine, just seeing how many ops have a ‘p’ in their name
<bod_> 9
<+Pici> bod_: /msg chanserv access #ubuntu list will give you a list of all #ubuntu ops
<bod_> omg, theres a command for everything,. can i grep for ‘p’ aswell?
<+nalioth> bod_: if there’s nothing we can help you with, /topic
* bod_ runs away
* bod_ has left #ubuntu-ops (”Leaving”)

I couldn’t help but chuckle for a good 10 minutes or so

PHPLondon Conference 08

March 5th, 2008

I managed to dodge most of the photos, however, one person managed to get a non-blurry shot of me.

Was a good conference, I’ll write more about it later…

Cheeky gits…

February 6th, 2008

Online food shopping - oh the joy.

When you shop for food online, generally, something will be out of stock, so you’ll get it substituted for a similar item.  This I can accept.

However, my monthly shopping came last night, and there was one replacement.

This would have been fine, it was a pasta sauce that they simply substituted for another flavour. However, for some reason, they substituted 2 x Flavour I asked for for 3 x Other Flavour.

Considering that the products differ only on their content (the flavour) and are the same price and weight, what makes them think that adding an extra one to my order is correct?

*sighs* I accepted it anyways, as it was actually the flavour I wanted, but couldn’t find on the website.

And on another note, darn Firefox for flagging up “flavour” as a spelling mistake. (even with the language set to en_GB!)

I want one…

January 23rd, 2008


If you are viewing this on a planet, you may need to click here to view the video