Friday, August 31, 2007

Setting Up Dancer-IRCD in Kubuntu

Definition of IRC:
Internet Relay Chat (IRC) is a form of real-time Internet chat or synchronous conferencing. It is mainly designed for group (many-to-many) communication in discussion forums called channels, but also allows one-to-one communication and data transfers via private message.

IRC was created by Jarkko "WiZ" Oikarinen in late August 1988 to replace a program called MUT (MultiUser talk) on a BBS called OuluBox in Finland. Oikarinen found inspiration in a chat system known as Bitnet Relay, which operated on the BITNET.

IRC gained prominence when it was used to report on the Soviet coup attempt of 1991 throughout a media blackout. It was previously used in a similar fashion by Kuwaitis during the Iraqi invasion. Relevant logs are available from ibiblio archive.

IRC client software is available for virtually every computer operating system.

Reference: http://en.wikipedia.org/wiki/Internet_Relay_Chat

What is Dancer-IRCD:
An IRC server designed for centrally maintained networks This is the ircd designed for use on OpenProjects Net (www.openprojects.net), based on the hybrid ircd used by efnet. It attempts to handle the network transparently as a unit, and to provide features to support the OPN philosophy. This package contains the main binary files.

Reference: http://linux.about.com/cs/linux101/g/dancerircd.htm

Requirements:

  • I'm using Kubuntu Gutsy, but it'll work fine with Debian Sarge & Etch, and Ubuntu Edgy, Feisty, and Dapper.. with or without a desktop environment.
  • You need to have an Internet connection so you can download dancer-ircd and dancer-services. If you don't have a connection, secure those packages via AptOnCD.
  • Text Editor, Gedit or Nano would do fine
  • Sudo or Root Access so you can modify the Dancer files residing in /etc

Installation:
via Command Line: sudo aptitude install dancer-ircd dancer-services
via Synaptic and/or Adept: see Synaptic and Adept Documentation



Configuration:
In this article, we need to configure 2 files /etc/dancer-ircd/ircd.conf and /etc/dancer-services/services.conf. They should be opened as root by your favorite text editor, may it be Gedit, Nano, or in my case, Kate.

We also need an IRC client to test it out. It can be GAIM or Pidgin, Konversation, Chatzilla, or Ksirc. I'll be using the Ksirc in this article.

/etc/dancer-ircd/dancer-ircd:
In line 48, change it to:
M:localhost.: :dancer-services localhost:

In line 314, change it to:
C:127.0.0.1:P@ssw0rD:services.
where P@ssw0rD is Your Password. Please change it accordingly.

In line 315, change it to
N:127.0.0.1:REMEMBER:services.

Trust me, you have to place REMEMBER on this line, this is temporary until we get our hashed password.

Hashed Password:
Open a text editor and place your password there. Please make sure you don't include a space after your password and do not hit the Enter key. Save it as password in your home directory.


Open a terminal window and type this command:
makepasswd --crypt-md5 --clearfrom password


Now you have there your Hashed password. Copy this string and replace the REMEMBER word on line 315 with this.
Line 315: N:127.0.0.1:$1$CdjQLLLa$/Mq69SSgCK/wtyNo/eIuw/:services.

Please take note that if you run the makepasswd command again, it'll spit out a completely different string. Don't worry, this works either way. It's a hashed result, so it will be a different string everytime you run the command.

/etc/dancer-services/services.conf:
In line 10, replace it with the following:
A:Dax Solomon Umaming <dax@knightlust.com>
Obviously, it's the Operator's username and password

In line 17, replace it with the following:
N:services.:dancer-services

In line 28, replace it with the following:
S:P@ssw0rD:127.0.0.1:6667
Again, please replace the password with your own.
If you want to use another port, do so here.

In line 57, replace it with the following:
O:~dax@127.0.0.1:REMEMBER:Knightlust:segjO
Replace the REMEMBER string with your hashed password
O:~dax@127.0.0.1:$1$CdjQLLLa$/Mq69SSgCK/wtyNo/eIuw/:Knightlust:segjO
Also replace Knightlust with the nick you plan on using with this server

In line 62 $ 63, replace it with the channel you want OperServ to monitor.
C:#baguio
C:#support-ph
Please take note that this is Optional.

In line 130, replace it with the following:
M:localhost:6667:127.0.0.1:6667:1m 4s

Testing:
Before firing up your favorite IRC client, make sure you double-check your settings. Once you're done, restart dancer-ircd and dancer-services.

sudo /etc/init.d/dancer-ircd restart
sudo /etc/init.d/dancer-services restart



In my system, there's a zlib warning, don't you worry about this. This may be bug, and I'll report this in Launchpad. After restarting dancer-ircd and dancer-services, launch your favorite IRC browser and try connecting to localhost:6667



If you have the following results, then you know that your IRCD's working. Now let's test dancer-services by issuing this command.

/msg nickserv register

If NickServ responded to the above command, then you know that dancer-services works. You're also sure that OperServ, ChanServ, and MemoServ's working.



So that's it.. congratulations. You now have an IRC server for your friends, family, and/or your business.

If you need other Dancer's advanced features, please consult the documentation.

Blogged with Flock

eGroupware Screenshots

Been wanting to install a groupware suite for a few weeks now, and I was able to last Tuesday. I went from eGroupware to Kolab to PHPGroupware to Scalix to Zimbra to OpenGroupware, and then finally, back to eGroupware.

I've been eyeing Kolab but I just didn't know how to configure it. I installed it from the repository, and then spent a day looking for ways to configure it, but failed. The Kolab Documentation failed to help me as well. And there's no article anywhere regarding Kolab installation in the Ubuntu forums and wiki. As for the others, some allowed me to install it, some won't. Some allowed me login, some won't - even with correct usernames and passwords. I gave up and went back to eGroupware - the only application from the repository which allowed me to install, login, and configure. It's very sluggish, mind you, but I still need a groupware suite. I'm just afraid that the developers might've compromised speed over user-friendliness. But who cares, I'll rarely use it. What matters is the email via IMAP (which works like a charm in eGroupware) and its' XMLRPC'd calendar. Which me and Jucato would be using to keep track of each other's schedules.

I'll probably spend a few hours configuring eGroupware, but that's just aesthetics. I'll probably do it on a weekend. Here's a few screenshots.

Here's the Home:


Here's the Email Page


Here's the Calendar


Here's the Addressbook


Here's the Project Manager


Here's the TimeSheet


Here's the File Manager


And here's the Site Demo Page


We also have a Work Flow module


a Wiki


And here's the the Site Manager


News Administration


And lastly, the Knowledge Base


There's a lot more modules available, but I disabled them because I know we won't use it - at least not in the near future. And the screenshots, here, it ain't much. But that's because I haven't populated it with data. Oh, I'll use them alright, but not right now. Also, I love the Project Manager module. It still lacks features found in TaskJuggler and KPlato, but it's enough for collaborative uses.

Now if only I can tweak this to make it faster. It is, afterall, soooo slow.

Blogged with Flock

Postfix and Dovecot Configuration Files

Here's my Postfix and Dovecot Configuration. I'll be using this once I install Hardy.

man.cf
home_mailbox = Maildir/

dovecot.conf
protocols = imaps pop3s
pop3_uidl_format = %08Xu%08Xv
mail_location = maildir:~/Maildir
imap_client_workarounds = tb-extra-mailbox-sep

Creating skel for future users
maildirmake.dovecot /etc/skel/Maildir
maildirmake.dovecot /etc/skel/Maildir/.Drafts
maildirmake.dovecot /etc/skel/Maildir/.Sent
maildirmake.dovecot /etc/skel/Maildir/.Trash
maildirmake.dovecot /etc/skel/Maildir/.Templates

Creating Maildir for existing users
cp -r /etc/skel/Maildir /home/myuser/
chown -R myuser:usergroup /home/myuser/Maildir
chmod -R 700 /home/myuser/Maildir

Reference:
https://help.ubuntu.com/community/Dovecot

Blogged with Flock

Thursday, August 30, 2007

New in KMail - for Kubuntu Gutsy fans

After this morning's update, the Basket bug was fixed. Bad news, the fix introduced a new bug - KMail crashing when pasting. Better news, KMail has a new feature. It's reminiscent of MS Office's Outlook.

Blogged with Flock

Subversion Howto - WebDav and SVNServe

It's been a couple of days since I've setup Subversion in my box. I'm posting this for future reference... I'll be reinstalling Kubuntu when the Next Alpha version comes out, and No... I'm not talking about Gutsy, I'm already using it. Most of the instructions here came from the Subversion article of the Ubuntu Documentation.

Preparation

  • Add svn group
  • Add my username and www-data as users of the group

  • sudo mkdir /var/svn
  • cd /var
  • sudo chown -R www-data svn
  • sudo chgrp -R svn svn
  • sudo chmod -R g+rws svn
  • sudo svnadmin create /var/svn
WebDAV Configuration
I need this so I can access my Subversion using the http:// protocol
  • Install libapache2-svn
  • Append the following into /etc/apache2/mods-available/dav_svn.conf
<Location /svn> DAV svn SVNPath /var/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/subversion/passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>

  • Restart Apache2: sudo /etc/init.d/apache2 restart
  • Add user: sudo htpasswd -c /etc/subversion/passwd username
SVN Configuration
svnserve.conf
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = Subversion Repository

passwd
[users]
user = password

authz
[/]
user =rw
* = r

/etc/init.d/svn
#!/bin/bash
svnserve -d -r /var/svn

Done!
So there it is, I've been accessing my Subversion by using both http and svn protocols. But I just might drop WebDAV access on my next reinstall. Frankly, it's redundant.

Blogged with Flock

Enabing mod_rewrite for Drupal 5.1 in Kubuntu

By default, Drupal have those annoying ?q= in the URL but you can disable them by configuring apache2.conf and enabling mod_rewrite. Why do we need to disable them? Search Engine Optimization.... the ?q= is the bane of SEO marketers and Search Engine bots sometimes skip sites with ?q= in the URL.

Enabling mod_rewrite
Issue the following command:

sudo a2enmod rewrite

That command will add the rewrite.load file to /etc/apache2/mods-enabled directory. To check if it's loaded, issue the command:

apache2ctl -M



Copy the Rewrite Engine
Append the following into your /etc/apache2/apache2.conf file.

 <Directory /var/www/>
   RewriteEngine on
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>



Restart Apache
Issue the following command:

sudo /etc/init.d/apache2 restart

Configure Drupal's Clean URL
Go to Administer > Site Configuration > Clean URLs
Click the Run the clean URL test link.



Success
If successful, the page below would show up, and would now allow you to Enable Clean URLs. Click the Save configuration button after you're done.



Don't forget the Path Module
Don't forget to enable the Path Module in Administer > Site Building > Modules
This will allow you to change the URL of a page.

Problems I encountered

  • The Clean URLs Handbook is too (and I mean too) generic. And I'll bet new Ubuntu users wouldn't understand what the hell that is.
  • The Option A in the handbook doesn't work. No matter what I do. I've tried re-reading the said handbook and re-configuring the apache2.conf but I still failed to make it work.

Blogged with Flock

EditDNS Howto in Kubuntu

I've been using EditDNS' services for a couple of months now, and I'm happy it's reliable. However, few people has asked me how to go about setting it up on a system with Dynamic IP address, and walking them through setting it up has consumed much of my time. That's why I'm writing this little howto.

Requirements:

  • you have Web Server installed. This may be Apache or Lighttp. Of course, assuming you wanted a web server. If you intend to use it for to host IRC, SVN, POP3, IMAP, etc. then you should have a server application for that as well.
  • your system should be accessible from the outside network. Try surfing to your IP address. If you don't know your IP address, go to http://whatismyip.com/. Also, just to make sure, ask a friend to surf using your IP address too.
  • if you can't access your PC from the outside, try checking your firewall. Better yet, disable it for the mean time.
  • if you still can't access your PC even with firewall disabled, check your router. Configure to forward port 80 (again, assuming you're setting up a web server) to your system. Check your router documentation, and please don't ask me.
  • get an account with EditDNS. There's no sense following this article if you don't have one.
  • if you have a domain, contact your domain provider regarding changing your Nameserver.
Instructions for Adding a Domain:
1. Login to EditDNS and skip the Help Us Spread the Word page.

2. Login to your domain provider's Control Panel and point the nameservers to:
  • ns1.us.editdns.net
  • ns2.us.editdns.net
  • ns3.us.editdns.net


3. Add a domain.. that is, if you have one. We'll go through adding a Sub-Domain later.



4. Add a DynDNS Record



5. On the Dynamic DNS Record Page, type in a password then place a check mark on your two domains listed below. Leave the "New DynRecord record (Optional):" blank. Click the Add button.



6. Verify settings.



7. Now check if it'll update by going to this website:

http://dyndns.editdns.net/api/dynLinux.php?p=password&r=knightlust.com

Please make sure you change the password and the knightlust.com with your details.



It should have one entry: Record has been updated. Now do the same thing for the other domain.

http://dyndns.editdns.net/api/dynLinux.php?p=password&r=www.knightlust.com

8. Get back to the EditDNS page and refresh it. Make sure the IP/Host is also updated. If it's updated, then you know it's working.



9. Install lynx, you don't need it, but the next step does.

sudo aptitude install lynx

10. Create a text file with the following entries:

#!/bin/bash
lynx -source "http://dyndns.editdns.net/api/dynLinux.php?p=password&r=knightlust.com" lynx -source "http://dyndns.editdns.net/api/dynLinux.php?p=password&r=www.knightlust.com"

Save the text file as editdns. We need this so it'll update EditDNS records every time you reboot or start this computer.



11. Move the editdns file to /etc/init.d

sudo mv editdns /etc/init.d

12. Create a symbolic link to /etc/rcS.d

sudo ln -s /etc/init.d/editdns /etc/rcS.d/S90editdns

Notes:
- Wait for at least 4 hours for your domain to propogate. Don't expect it to work right after setting it up.
- You may also add No. 10 to your crontab, instead of placing it into /etc/init.d and /etc/rcS.d.
- If your ISP changes your IP address while online, you don't have to reboot your system. Just issue the command:

sudo /etc/init.d/editdns

Instructions for Adding a Sub-Domain:

1. Login to EditDNS and skip the Help Us Spread the Word page.

2. Type in a sub-domain that you want. Then click the Add button



3. Click the left [x] to modify it. And don't mind the "You currently don't have any domain names." message, I think it's a bug.



4. Add a new DynRecord.



5. Enter a password and place a check mark on your Record Name, just below the Add column. Then click the Add button.



6. Verify Settings.



7. Now check if it'll update by going to this website:

http://dyndns.editdns.net/api/dynLinux.php?p=password&r=dax.mydyn.net

Please make sure you change the password and the dax.mydyn.net with your details.



8. Get back to the EditDNS page and refresh it. Make sure the IP/Host is also updated. If it's updated, then you know it's working.



9. Install lynx, you don't need it, but the next step does.

sudo aptitude install lynx

10. Create a text file with the following entries:

#!/bin/bash
lynx -source "http://dyndns.editdns.net/api/dynLinux.php?p=password&r=dax.mydyn.net"
Save the text file as editdns. We need this so it'll update EditDNS records every time you reboot or start this computer.



11. Move the editdns file to /etc/init.d

sudo mv editdns /etc/init.d

12. Create a symbolic link to /etc/rcS.d

sudo ln -s /etc/init.d/editdns /etc/rcS.d/S90editdns

Notes:
- Wait for at least 4 hours for your domain to propogate. Don't expect it to work right after setting it up.
- You may also add No. 10 to your crontab, instead of placing it into /etc/init.d and /etc/rcS.d.
- If your ISP changes your IP address while online, you don't have to reboot your system. Just issue the command:

sudo /etc/init.d/editdns

Additional Notes:
It is not required to have a DynRecord for knightlust.com and www.knightlust.com. A single DynRecord for knightlust.com is enough. Just make sure to CNAME www.knightlust.com. If you choose this option, then you may remove the second entry from /etc/init.d/editdns.

Blogged with Flock

Monday, August 27, 2007

Personal SVN Repository

After a few days of intensive testing (importing, deleting, and committing), I finally have a stable Subversion Repository. I'll be using this to manage my and Jucato's codes. Yeah, we're code-buddies - if there's such a term.
It's stored on my /var partition with around 7GB of free disk space and can be accessed using the Command-line or by using a client. The address is:

However, after three weeks, you should access it using http://knightlust.com/svn or svn://knightlust.com since I'll be linking my domain name to my box.

This has a few drawbacks though, since I don't have a dedicated server, the site will go offline whenever I go to sleep. Hey, I can't afford a 24/7 workstation *slash* server since my box eats a lot of power... Translation? Electricity bill! But after a few months time, I'll go get myself a mini-itx fanless box that'll act as my server. It only eats up less than 18 watts and will greatly help with my utility bills. Until that time though, I cannot provide a 24/7 uptime. Heh!



Blogged with Flock

TP-Link TL-R860 Screenshots

Here's a few (actually a lot) of screenshots regarding my router, a TP-Link Model No. TL-R860. It's a wired 8-port router. I've posted screenshots so people would have an idea of its' features.

The manual for the router is in the mini/business-card CD that comes with the package - a long with a lot more manuals for their other products. If for some reason you misplaced it, you can download a copy by clicking on the link below.


Default router address is http://192.168.1.1/


This is the router home page.


And this is actually my favorite part. The router supports only three configurations... Dynamic IP, Static IP, and PPPPoE. If you have PLDT, select Dynamic IP and click on Next. You'll be connected right after. But if your ISP supports PPPoE, then you have to select it, then enter your Username and Password. Don't worry, it just works(tm)... And lastly, if you have a business account and subscribed to two or more IP Address, select Static IP and input the necessary details. The details SHOULD be provided by your ISP... NOT ME! So please don't bug me regarding this!
I know this is common sense - but trust me, a lot of people don't know and expect those that have the same hardware to have the same configuration as theirs.














One of the main features of this router is Security. My Kubuntu's moonlighting as a multi-purpose server, and I need to open a few ports so my friends can access my box from the outside. Oh, this router is like Ubuntu, it has no open ports by default making your network un-crackable from the outside.
This feature right here would direct incoming traffic to my workstation. It won't affect my other two system.




You do have to be careful with this though. Since enabling DMZ would open a workstation to the world with all ports open. If you decide to use this feature, don't forget to install a firewall. I recommend GuardDog, FWBuilder, or Firestarter. I for one uses Firestarter because of one feature - real-time monitoring - that GuardDog and FWBuilder doesn't have.












If you want to administer this page from the outside, you have to configure it here. But if you have a Dynamic IP, then I'm afraid it won't work.






I'm using EditDNS, too bad it's not included in the list of Service Providers. I might sign up with DynDNS soon, but I still have to compare features. For now, EditDNS would suffice.








If you make any changes, Back it up from this page. You won't regret it. Especially if you "accidentally" reset the router. At least you wouldn't have to start from reconfiguring it from scratch.




And oh, don't forget to change Username and Password. People tend to overlook this, what they don't know is that a simple configuration would help a great deal securing their network.





Blogged with Flock