Posts Tagged ‘configure’
Friday, July 29th, 2011 I’ve recently had to manually assign a static IP address on one of the servers I manage, here is how I did it:
debian:~# vim /etc/network/interfaces
Inside the file I placed:
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static address 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.0 gateway 192.168.0.1 dns-nameservers 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220
The broadcast and gateway configuration lines are not obligitory.
dns-nameservers would re-create /etc/resolv.conf file with the nameserver values specified which in these case are Google Public DNS servers and OpenDNS servers.
Very important variable is allow-hotplug eth0
If these variable with eth0 lan interface is omitted or missing (due to some some weird reason), the result would be the output you see from the command below:
debian:~# /etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...
Besides the /etc/init.d/networking restart is deprecated because it may not enable again some interfaces … (warning). , if the allow-hotplug eth0 variable is omitted the eth0 interface would not be brough up on next server boot or via the networking start/stop/restart init script.
My first reaction when I saw the message was that probably I’ll have to use invoke-rc.d, e.g.:
debian:~# invoke-rc.d networking restart
Running invoke-rc.d networking restart is deprecated because it may not enable again some interfaces ... (warning).
However as you see from above’s command output, running invoke-rc.d helped neither.
I was quite surprised with the inability to bring my network up for a while with the networking init script.
Interestingly using the command:
debian:~# ifup eth0
was able to succesfully bring up the network interface, whether still invoke-rc.d networking start failed.
After some wondering I finally figured out that the eth0 was not brought up by networking init script, because auto eth0 or allow-hotplug eth0 (which by the way are completely interchangable variables) were missing.
I added allow-hotplug eth0 and afterwards the networking script worked like a charm 😉
Tags: Auto, broadcast, configure, debian gnu, DNS, dns nameservers, etc network, eth, file, gateway, GNU, google, inet, init, interfacesInside, lan interface, Linux, nameserver, nbsp, nbsp nbsp nbsp nbsp nbsp, Netmask, network interface, network interfaces, Networking, OpenDNS, public dns servers, reason, resolv, script, server boot, Start, static address, static ip address, vim, weird reason
Posted in Linux, System Administration, Various | No Comments »
Wednesday, December 29th, 2010 One of the websites based on Joomla, that I’m managing, had to have the option to show a Visitors Counter on the page bottom.
I did some research online to check for some Joomla plugins that are capable of aiming my Joomla installation with the Visitor Counter feature.
There are a couple of plugins available out there that are able to provide a Joomla installation with a Web Counter, however I’ll just mention the few which I have tested myself.
The ones I’ve tested myself are;
1. VCNT
2. Count your Visitors
3. Cool Hits Counter
and finally the one that I really liked the most:
4. VINAORA
All the prior 3 aforementioned VCNT, Count your Visitors and Cool Hits Counter, are actually working right after installation. I haven’t had the time to test them thoroughfully but from a first look they appear to be counting the visitors.
The Count your visitors – joomla plugin’s download main page was in German with no option to revert to English, so that wasn’t nice.
Though the plugin seems to work fine after just downloaded and installed and configured from
Extensions -> Module Manager
The configuration options for Count your visitors are quite obscure but if you’re a looking for a really simple way to count your Joomla based website visitors it might be a good choice. The plugin is based on the initial Joomla module called Statistics.
By the way I’ve read some reports online that actually Joomla 1.5 also includes some kind of minimal integrated web counter embedded in itself throughout the Joomla Statistics module .
However I personally couldn’t really follow the methods describe to take advantage of the Joomla install integrated Statistics module, however if somebody has already succeeded in using the Statistics default joomla module I’ll be glad, if he shares with me.
I’ve found the VCNT visitor statistics plugin a handy one, but this module had this major problem that the VCNT 1.5 text which was appearing as a heading before the statistics was hard to wipe out of my web page, so eventually I got pissed of and thought and tested the Cool Hits Counter.
The Cool Hits Counter is actually a simplistic module which presents a counter about visitors on the web site in numeric digit numbers.
These module uses the integrated Joomla 1.5 module mod_stats the only difference is the support for numeric digit numbers.
As I’ve said none of the above modules wasn’t flexible enough and therefore wasn’t what I was looking for, thus I decided to use my installed VINAORA Joomla web(users) counter plugin.
The VINAORA is actually quite straight foward to configure, right after installation to start with the configuration I had to navigate to:
Extension -> Module Manager -> Vinaora Visitors Counter -> Module Parameters
Since I wanted just a simple counter without any external statistics I personally prefered using Vinaora’s counter with the optionsDisplay Mode: Simple as well as the Zero-Statistics turned on to (Yes)
Some of the other options I found to be best matching my desires for the Visitors Counter was:
Show Title: No and Position: Left
Now I had this shiny visitors statistics in my Joomla installation but there was the annoying Link in my Visitors Counter appearing on the page, thus in order to remove the default link Visitors Counter which was pointing to the VINAORA’s web page, I had to edit the file:
modules/mod_vvisit_counter/tmpl/default.php located in my Joomla Document Root directory.
First I’ve edited the code on line 21 where I’ve removed out the Vinaora string since I didn’t wanted any reference to Vinaora to occur in my Joomla HTML code.
In line 162 in the code:
$html .= ….
By removing it I’ve completed scraped out the annoying references to VINAORA and their link to http://vinaora.com website and thus made the Visitors counter a look a bit more professional.
Now the counter is working with a graphical numeric digits and everything is just fine with my Web counter Joomla counter thanks to VINAORA 🙂
Tags: configuration options, configure, count your visitors, download, Extension, feature, file, How to add visitor/visitors counter in Joomla based website using the VINAORA joomla plugin, installation, mod, Module, none, option, optionsDisplay, page, page bottom, Parameters, plugin, right, show, statistics, support, text, time, vcnt, visitor counter, website visitors, Zero
Posted in Joomla, Linux, System Administration, Various | 3 Comments »
Saturday, March 17th, 2012 Default XFce picture viewer on Slackware Linux is GIMP (GNU Image Manipulation Program). Though GIMP is great for picture editting, it is rather strange why Patrick Volkerding compiled XFCE to use GIMP as a default picture viewer? The downsides of GIMP being default picture viewing program for Slackware's XFCE are the same like Xubuntu's XFCE risterroro, you can't switch easily pictures back and forward with some keyboard keys (left, right arrow keys, backspace or space etc.). Besides that another disadvantage of using GIMP are;
a) picture opening time in GIMP loading is significantly higher if compared to a simple picture viewer program like Gnome's default, eye of the gnome – eog.
b) GIMP is more CPU intensive and puts high load on each picture opening
A default Slackware install comes with two good picture viewing programs substitute for GIMP:
- Gwenview

-
- Geeqie
-
Both of the programs support picture changing, so if you open a picture you can switch to the other ones in the same directory as the first opened one.
I personally liked more Gwenview because it has more intutive picture switching controls. With it you can switch with keyboard keys space and backspace
To change GIMP's default PNG, JPEG opening I had with mouse right button over a pic and in properties change, Open With: program.

If you're curious about the picture on on all screenshots, this is Church – Saint George (situated in the city center of Dobrich, Bulgaria).
St. Georgi / St. George Church is built in 1842 and is the oldest Orthodox Church in Dobrich.
In the Crimean War (1853-1856) the church was burned down and was restored to its present form in 1864.
gpicview is another cool picture viewing program, I like. Unfortunately on Slackware, there is no prebuild package and the only option is either to convert it with alien from deb package or to download source and compile as usual with ./configure && make && make install .
Downloading and compiling from source went just fine on Slackware Linux 13.37gpicview has more modern looking interface, than gwenview and geeqie. and is great for people who want to be in pace with desktop fashion 🙂
Tags: arrow, arrow keys, Auto, backspace, Button, center, change, city, configure, crimean war 1853, deb package, Desktop, desktop environment, dobrich bulgaria, download, Draft, eye, georgi, GIMP, Gnome, gnu image manipulation, gnu image manipulation program, image manipulation program, keyboard keys, manipulation, nbsp, Open, opening time, option, orthodox church, other ones, package, picture editting, png, program, Risterroro, st george church, substitute, time, XFCE, Xubuntu
Posted in Linux and FreeBSD Desktop, System Administration | No Comments »
Friday, August 13th, 2010 
If you want to imrpove your internet privacy through tor-rifing your network traffic of ICQ and MSN networks.
Do the following:
1. Install tor server
debian:~# apt-get install tor
2. Install the polipo caching proxy
debian:~# apt-get install polipo
3. Download and overwrite default polipo configuration with the one from torproject.org
This is necessary to configure in order to have polipo adapted to work with tor, so issue the following commands:
debian:~# cd /etc/polipo
debian:~# wget https://svn.torproject.org/svn/torbrowser/trunk/build-scripts/config/polipo.conf
debian:~# mv config config.bak
debian:~# mv polipo.conf config
4. Restart polipo for the new config settings to take affect
debian:~# /etc/init.d/polipo restart
Make sure in your /etc/tor/torrc you have existing the following two torrc directives:
debian:~# vim /etc/tor/torrc
SocksPort 9050 # what port to open for local application connections
SocksListenAddress 127.0.0.1 # accept connections only from localhost
5. Start up tor server if it’s not already started
debian:~# /etc/init.d/tor retart
6. Install pidgin if you haven’t got it installed already
debian:~# apt-get install pidgin
8. Start up the recent installed pidgin multi-protocol instant messanger
hipo@debian:~$ pidgin &
If you already previously properly installed and configured version of pidgin.
9. In pidgin messanger do the following changes to configure it to proxy traffic via tor
In your either your existing ICQ / MSN pidgin account navigate to:
- Accounts -> Manage Accounts
- Under Protocol ICQ
-
click Modify..
- Now go to Proxy
The default Proxy setting in Debian Sid/Squeeze would Use GNOME Proxy Settings however in other Linux distributions or *BSD it could be either No Proxy or some other setting.
- Now substitute whatever options is choosen with SOCKS 5
- In the below data input field with a name Host: type 127.0.0.1
- For the Port: field box type the port 9050
You specify for a local proxy port 9050 because this is the default port where we have previosly configured polipo to proxify traffic to tor’s anonymity network
The settings tor tunneling of traffic for Protocol MSN are analogous like for the ICQ Protocol so I won’t repeat myself on that.
This described tor tunneling for ICQ and MSN traffic should be applicable to other IM protocols under the same logic.
Here is the time to nota that the above instructions should be also applicable for Gain with minor changes or even without any.
Of course because tunneling traffic via Poplipo and it’s handling over to a tor node which will pass traffic randomly through different geographical locations whether tor servers reside will be more time consuming, so login account login time to your Messanger protocol of choice will vary and would be a bit longer.
The use of tor for your MSN and ICQ traffic is twofold:
1. Using tor anonymizing traffic network will keep your anonymity on the net private
2. Using the tor anonimity online services will let you access IM servers despite firewall blocking applied by administrators on certain places for instance (in your School or Your work env) and will therefore let you still use your favourite IM in spite of the applied firewall restrictions.
Anyways as we all know life is not perfect 🙂
Despite the slower logins and the bit slower message transmission, at least you won’t be easily tracable by third party prying eyes,
administrators or any other messanger spying sniffer traffic logger installed somewhere in between yourself and the end side of an IM server.
Hope this article helps somebody out there and will be a step further in the battle for securying your privacy online.
Tags: amp, Anonymising ICQ and MSN and other messangers via Tor on Linux, bak, config, config settings, configure, debian sid, Gnome, hipo, icq, init, Install, instant messanger, internet privacy, linux distributions, localhost, login, Manage, messangers, MSN, mv, nbsp, network traffic, overwrite, pidgin, polipo, Privacy, Protocol, proxy settings, Restart, retart, scripts, squeeze, time, tor, torproject, type, vim, wget
Posted in Computer Security, FreeBSD, Linux, Linux and FreeBSD Desktop | 3 Comments »
Friday, February 24th, 2012 There two main reasons which cause incorrect clock settings on Slackware Linux.
One common reason for incorrectly set time is improper clock and timezone settings during Slackware install.
On install, one of the ncruses install menus asks an ambigious dialog question reading
HARDWARE CLOCK SET TO UTC?
Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?
Some newbie Slackware users make the mistake to choose YES here, resulting in incorrectly set clock.
Second possibility for improper time is incorrect time on BIOS level. This is not so common among laptop and modern desktop PCs. However in the past impoper system BIOS hardware clock was usual.
In any case it is a good practice to check the system PC BIOS clock settings.
To check BIOS battery hardware clock from command line use:
bash-4.1# hwclock --show
Fri 24 Feb 2012 01:24:18 AM EET -0.469279 seconds
The system clock on Slackware is set via a script called timeconfig. To fix slack's incorrect host time run:
bash-4.1# timeconfig


Running timeconfig once should configure a proper timezone to be set on next system reboot, however the system time will probably still be not ok.
To manually set time to right time, use date command. To set manually the system wide time to 12:00:00 with date:
bash-4.1# date -s "12:00:00"
Anyways for time accuracy the ntpdate should be used to feth time from NTP internet time server:
bash-4.1# ntpdate time.nist.gov
...
Finally to make the new set right time permanent also for the BIOS battery clock issue:
bash-4.1# hwclock --systohc
By the way its curious fact Slackware Linux is the oldest still existent GNU / Linux based distribution. Its up and running since the very day GNU and Linux came to merge at one Free OS 😉
Tags: ambigious, Auto, bios clock, clock settings, configure, Coordinated, coordinated universal time, curious fact, Desktop, distribution, Draft, EET, feth, free os, Fri, gnu linux, hardware, hardware clock, host, host time, hwclock, improper time, incorrect time, internet time server, laptop, level, Linux, ntpdate, possibility, quot, reading, reason, script, show, slack, slackware linux, slackware users, system bios, system clock, systohc, time, time accuracy, time run, timezone, timezone settings, Universal, UTC, YES
Posted in Linux, System Administration | 6 Comments »
Tuesday, December 7th, 2010 I’m using a template youbizz just recently for a website. The website is already configured to use Joomla as a CMS.
This is a website related to the university so joomla was the perfect choice for a quick and easy to configure Content Management System
The youbizz template really makes difference and make the website layout look & feel quite a business looking.
However I needed a way to make my general configured menu buttons on the website to have a dropdown sub-menus in it
I even didn’t know if Joomla is supporting this, but by a chance I’ve made a submenu to the website Home buttom menu and thus I learned it how I can make submenus.
It actually appears creating the submenus to a menu in Joomla is a piece of cake, all you have to do in joomla administrator is go to to:
Menus -> Main Menu
From there you can configure as website buttons and link them to the ones already prepared in Article Manager
Just in case if you don’t know to add a buttons to a new joomla installation it’s necessary from admin to first go to:
Content -> Article Manager
Next press the New button (a green button with an image of a plus sign)
Thereon put a Title , Alias and in the input box put on everything you want this button pressed to show up in ur website.
Completing that simply press the Apply button and it should be done.
Next step to make the article appear in Menus -> Main Menu is to go this section and respectively from there use the green button with the plus sign to add up a new element to the main menu.
Right after you will have the Menu Item: [ New ] to appear it looks like in the pic below:

From the list of items to select you need to select the Article menu element. A submenu will appear in your browser to the Articles reading:
Article Layout
Article Submission Layout
etc.
From this menu you will have to select the Article Layout
The next screen to appear will look like the pic below:

Here in article layout few things needs to be adjusted, again you will need to place the Title and the Alias, further after from the Parameters (Basic) located on the right you will have to select an article to link the new menu you’re just creating in Joomla’s new menu.
This is achieved via pressing the Select button located nearby the Select Article
Here it’s important to note the existence of Parent Item scrolldown field. This field will have all the created menu buttons in Main Menu . In case if this is the first one to create in main menu then it could be also empty.
The Parent Item field is really an important field and through it the menu’s submenus are created in Joomla.
For instance let’s say you want the current creating article to be listing as a sub-benu button to another already existing category, instead of listing as a separate button to the Joomla’s main menu navigation.
Well it’s pretty easy just choose from the Parent Item the name of an already existing menu button in Joomla main menu to be the parent of the sub-menu button you want to have.
That’s it now you will have the sub-menu button to appear as a drop down button (if of course your template supports dropdown menus).
There are few more options to choose in between which I found to be quite self explanatory, so I want explain them
But I hope I was able to explain at least the basics how menu subbuttons can be created in Joomla 1.5I find it a bit harder to explain in a bit plain way, but anyways if some of my dear readers is not understanding how to achieve the sub-menus I’m more than willing to help out further via the comments.
Tags: alias, article layout, article manager, article menu, article submission, buttom, Button, cake, chance, cms, configure, content management system, difference, dropdown menus, element, everything, green button, home, How to Add sub-menus to Joomla main navigation buttons (Making dropdown menus) in Joomla, Image, input box, installation, Item, menu, menu buttons, menu element, menus, navigation buttons, new button, new element, parent, perfect choice, piece, piece of cake, Plus, submenu, template, Thereon, website buttons, website layout, youbizz
Posted in Everyday Life, Joomla, Linux, Programming, System Administration | No Comments »
Saturday, April 9th, 2011 I have noticed that many blogs nowdays offer an email subscription box to simplify the subscription procedure for the blog readers.
My blog was lacking this feature so I took the time to find out how can I add an e-mail subscription box field on my blog.
My research has shown me that the easiest way to add the subscription box is by using Google’s Feedburner RSS service .
I’ve been using Google FeedBurner for quite some time and I’ve already 27 subscriptions with it.
Earlier when I added a FeedBurner subsciption to my blog I’ve blogged about it, so if you’re not acquainted on how to add FeedBurner service to your blog, you might want to read my previous article Adding RSS Feed to WordPress in conjunction with FeedBurner / WordPress add-to-any-subscribe plugin
In this article I will explain in short step by step, how to add the subscrpition email box to your wordpress I assume, that the reader has already enabled and configured registration with Feedburner, if you still haven’t just skip few lines above and check my previous article.
I would hereby skip the explanation of why feedburner as an RSS is so advantageous for every blog owner and readers and skip further to the email subscription procedure step by step instructions:
Step 1: Login to your FeedBurner Account
In my case my feedburner account url is accessed via the URL http://feeds.feedburner.com/WalkingInLightWithChrist-FaithComputingDiary
I have been properly logged in to my feedburner, so to view statistics of my current feeds subscription and to configure various variables of feedburner I had to access the URL address: http://feedburner.google.com/fb/a/myfeeds, a very quick shortcut to my feedburner account settings is also avaialable by simply accessing the URL: http://feedburner.com
Step 2: Click on the link that says My Feeds
If you have configured feeds for your feedburner you will get the list of feedburner feeds, (one could have multiple feeds, let’s say if you have a couple of blogs or sites and you use one feedburner account to podcast your feeds for each of the separated blogs or sites.
Step 3: Click over the feed you want to have the feedburner email subscription box
Below you see the screenshot of my configured feedburner feed:

Right after clicking on your configured feed in my case Walking in Light With Christ – Faith, Computing, Diary you will see the screen:

Step 4: Click on Publicize menu
You will see the following two screens while scrolling with your browser:


You see in the second screenshot above there is a textbox with a html form code, to set the feedburner subscription to appear on your blog you need to copy/paste this code and put it on your blog.
After copy/pasting the code, don’t forget to scroll down in your browser and save the email subscription generated form settings, (NB! if you don’t save it it want be working even if you install it on your blog).
Here is the Save button screenshot:

Step 5: Setting up feedburner email textbox to wordpress
In order to set up the just copied html and css form code you need to login to your wordpress blog admin and go to:
Appearance -> Widgets
Scroll over the Available Widgets list, find the Text Widget and press the Add button to include the Text Widget to your blog sidebar.
Further on the same Widgets page, go to the Sidebar menu find the just added Text Widget and click over the Edit link:

Here is my screenshot of the edit screen of the Text Widget:

Step 6. Add the feedburner email subscription box to single posts blog views
This step is not a requirement, but I found it for myself to be vital, as it might rise some more subscribers to my blog, if my blog readers finds individual indexed pages in Google.
This step is also highly dependant on the wordpress theme you use, I use the old wordpress default theme and it’s default behaviour is not to show up the wordpress sidebar, whether an individual wordpress post is clicked over, therefore to enable my feedburner subscription box for individual posts I also need to place the form code obtained from Feedburner.com’s to my templates single.php
If you’re using some kind of theme that doesn’t have the non-sidebar single post behaviour you might skip forward this step, otherwise just continue on reading.
To include the feedburner email form subscription to my single posts I edited blog/wp-content/themes/default/single.php
In the single.php file find the code:
<?php comments_template(); ?>
Immediately after the above code place your feedburner form code, like you see in below screenshot:

Step 7: Modify your form code css and javascript to make your feedburner more accustomed for your needs
Again this step is voluntary and is not necessery I’ve disliked the default way the form is formatted so I played a bit with few of it’s values to customize it to my likings, the things which I have changed a bit in the provided feedburner form code was:
- Remove the Delivered by Feedburner text from the form
-
>To do so in the issued feedburner form code below when you copy the code paste it to some text editor and remove from the code the text:<p>Delivered by <a href=”http://feedburner.google.com” target=”_blank”>FeedBurner</a></p>
- – Change the subsciption box width and height:
-
style=”width:140px”Changed that to:style=”width:120px”also I’ve changed:’scrollbars=yes,width=550,height=520’to:’scrollbars=yes,width=450,height=420’Another point of interest for adjustmnets in the feedburner for are in the form code:
- Remove feedburner subscription form default bordering
-
form style=”border:1px solid #ccc;padding:3px;text-align:center;”I’ve changed that to:form style=”border:0px solid #ccc;padding:2px;text-align:center;”By changing the css values border:1px to border:0px I have instructed the subscription box to show up without borders.
That’s all now refresh in your browser and check if the feedburner email subscription form is showing up properly to your wordpress.
To completely ensure yourself it works correctly try to subscribe yourself to the form and during your next blog post you should receive an email notifying you about the newly written article.
You can see, my blog feedburner subscription form on the blog right sidebar or on the below picture:

Hope that article will help somebody out there.
Tags: account settings, blogs, Button, Click, code, configure, conjunction, e mail, explanation, feature, Feed, Feedburner, form, google, mail subscription, menu, php, plugin, podcast, quite some time, screen, screenshot, scroll, sidebar, statistics, step 1, step 2, subsciption, subscription procedure, subscriptions, subscrpition, time, url, url address, variables, Wordpress
Posted in Various, Web and CMS, Wordpress | 7 Comments »
Saturday, May 28th, 2011 One of the mail server clients is running into issues with secured SSL IMAP connections ( he has to use a multiple email accounts on the same computer).
I was informed that part of the email addresses are working correctly, however the newly created ones were failing to authenticate even though all the Outlook Express email configuration was correct as well as the username and password typed in were a real existing credentials on the vpopmail server.
Initially I thought, something is wrong with his newly configured emails but it seems all the settings were perfectly correct!
After a lot of wondering what might be wrong I was dumb enough not to check my imap log files.
After checking in my /var/log/mail.log which is the default log file I’ve configured for vpopmail and some of my qmail server services, I found the following error repeating again and again:
imapd-ssl: Maximum connection limit reached for ::ffff:xxx.xxx.xxx.xxx" imapd-ssl error
where xxx.xxx.xxx.xxx was the email user computer IP address.
This issues was caused by one of my configuration settings in the imapd-ssl and imap config file:
/usr/lib/courier-imap/etc/imapd
In /usr/lib/courier-imap/etc/imapd there is a config segment called
Maximum number of connections to accept from the same IP address
Right below this commented text is the variable:
MAXPERIP=4
As you can see it seems I used some very low value for the maximum number of connections from one and the same IP address.
I suppose my logic to set such a low value was my desire to protect the IMAP server from Denial of Service attacks, however 4 is really too low and causes problem, thus to solve the mail connection issues for the user I raised the MAXPERIP value to 50:
MAXPERIP=50
Now to force the new imapd and imapd-ssl services to reload it’s config I did a restart of the courier-imap, like so:
debian:~# /etc/init.d/courier-imap restart
That’s all now the error is gone and the client could easily configure up to 50 mailbox accounts on his PC 🙂
Tags: address right, client, config, configuration settings, configure, connection, courier imap, credentials, default log, Denial, denial of service, denial of service attacks, email accounts, email addresses, errorwhere, Express, ffff, file, imap connections, imap server, init, lib, limit, mail connection, mail log, mail server, Maximum, maximum connection, maximum number, outlook, outlook express, password, quot, segment, server clients, server services, Service, something, ssl services, text, username, value
Posted in Linux, Qmail, System Administration | 2 Comments »
Thursday, August 11th, 2011 I’ve completed a qmail installation few days ago on a fresh installed Debian Squeeze 64 bit server. All is configured and works fine, except qmailadmin and vqadmin.
As the mail server was missing any kind of web mail administration panel, I needed to make at least one of the two above to make with qmail.
I decided to concentrate on qmailadmin and took the time to make it work. I used the following command lines and got the compile failure during make compilation:
debian:/usr/local/src/qmailadmin-1.2.15# ./configure --enable-cgibindir=/usr/lib/cgi-bin --enable-htmldir=/var/www/qmailadmin/ --enable-modify-quota
...
debian:/usr/local/src/qmailadmin-1.2.15# make
...
The source make failed with the following error:
In file included from template.c:45:
qmailadmin.h:37:1: warning: "MAX_FILE_NAME" redefined
In file included from template.c:28:
/home/vpopmail/include/vpopmail.h:146:1: warning: this is the location of the previous definition
template.c: In function "send_template_now":
template.c:505: error: "VERSION" undeclared (first use in this function)
template.c:505: error: (Each undeclared identifier is reported only once
template.c:505: error: for each function it appears in.)
make[1]: *** [template.o] Error 1
make[1]: Leaving directory `/usr/local/src/qmailadmin-1.2.15'
make: *** [all] Error 2
To workaround these compile issues, I’ve had to modify the C source file belonging to qmailadmin ( template.c ), e.g.:
debian:/usr/local/src/qmailadmin-1.2.15# vim template.c
In the file I had to add besides the line:
#include "util.h"
The code:
#define VERSION ""
Aterwards qmailadmin’s compile and install via make && make install-strip succeeded and now works perfectly fine 😉
Tags: Administration, administration panel, amp, bit, c source, code, compilation, configure, configured, failure, few days, file, function, identifier, installation, lib, Linux, location, mail administration, mail server, make, name, oncetemplate, panel, qmail installation, qmailadmin, quot, Quota, source file, squeeze, template, template c, time, undeclared identifier, util, version, vim, vqadmin
Posted in Linux, Qmail, System Administration, Web and CMS | 13 Comments »
Friday, February 10th, 2012

On FreeBSD ntpd , ntpdc , ntpdate , ntpq doesn't need to be installed via a specific package like on GNU/Linux as they're part of the FreeBSD world (binary standardly shipped with FreeBSD basis system).
The FreeBSD handbook has a chapter explaining thoroughfully on ntp on FreeBSD ,however for the lazy ones here is a short few steps tutorial on how to install and configure ntpd on bsd :
1. Copy sample ntp.conf file to /etc/
freebsd# cp -rpf /usr/src/etc/ntp.conf /etc/ntp/
No need for any modifications if you don't want to apply some specific restrictions on whom can access the ntpd server. If you update regularly the FreeBSD system with freebsd-update or directly by rebuilding the FreeBSD kernel / world adding restrictions might be not necessery..
If you check /usr/src/etc/ntp.conf you will notice freebsd project people are running their own ntp servers , by default ntpd will use this servers to fetch timing information. The exact server hosts which as of time of writting are used can be seen in ntp.conf and are:
server 0.freebsd.pool.ntp.org iburst maxpoll 9
server 1.freebsd.pool.ntp.org iburst maxpoll 9
server 2.freebsd.pool.ntp.org iburst maxpoll 9
2. Add ntpd daemon to load on system boot via /etc/rc.conf
By default ntpd is disabled on FreeBSD, you can see if it is disabled or enabled by invoking:
freebsd# /etc/rc.d/ntpd rcvar
# ntpd
ntpd_enable=NO
To Enable ntpd to get loaded each time it boots , following 3 lines has to be added in /etc/rc.conf .
ntpdate_enable="YES"
ntpdate_flags="europe.pool.ntp.org"
ntpd_enable="YES"
Quick way to add them is to use echo :
echo 'ntpdate_enable="YES" >> /etc/rc.conf
echo 'ntpdate_flags="europe.pool.ntp.org" >> /etc/rc.conf
echo 'ntpd_enable="YES" >> /etc/rc.conf
Now as the 3 rc.conf vars are set to "YES", the ntpd can be started. Without having this variables in /etc/rc.conf , "/etc/rc.d/ntpd start" will refuse to start ntpd.
3. Start the ntpd service
freebsd# /etc/rc.d/ntpd start
...
One interesting note to make is ntpd can also operate without specifying any config file (/etc/ntp.conf), the only requirement for the server to start is to have a properly set ntpdate server, like lets say (ntpdate_flags="europe.pool.ntp.org")
4. Permit only certain host or localhost to "talk" to the ntpd server
If you want to imply some ntp server restrictions, the configuration directives are same like on Linux:
To allow only a a host inside a local network with IP 192.168.0.2 as well as localhost, to be able to fetch time information via ntpd server put inside /etc/ntp.conf:
restrict 127.0.0.1
restrict 192.168.0.1 mask 255.255.255.0 nomodify notrap
If you want to prohibit ntpd to serve as a Network Time Server, to any other host except localhost, add in /etc/ntp.conf :
restrict default ignore
Allowing and denying certain hosts can be also done on pf (packet filter) or ipfw firewall level, and in my view is easier (and less confusing), than adding restrictions through ntp.conf. Besides that using directly the server firewall to apply restrictions is more secure. If for instance a remote exploit vulnerability is discovered affecting your ntpd server. this will not affect you externally as access to the UDP port 123 will be disabled on a firewall level.
Something good to mention is NTP servers communicate between each other using the UDP source/destination (port 123). Hence if the NTPD server has to be publicly accessible and there is a firewall already implemented, access to source/dest port 123 should be included in the configured firewall …
5. Check if the ntp server is running properly / ntp server query operations
[root@pcfreak /home/hipo]# ps axuww|grep -i ntp
root 15647 0.0 0.2 4672 1848 ?? Ss 2:49PM 0:00.04 /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift
To query the now running ntpd server as well as set various configuration options "on the fly" (e.g. without need for ntp.conf edits and init script restart), a tool called ntpdc exists. ntpdc tool could be used to connect to localhost running ntpd as well as to connect and manage remotely a ntpd server.
The most basic use of ntpdc is to check (server peers).:
freebsd# ntpdc localhost
ntpdc> peers
remote local st poll reach delay offset disp
===================================================
kgb.comnet.bg 83.228.93.76 2 64 377 0.00282 -0.050575 0.06059
*billing.easy-la 83.228.93.76 2 64 377 0.01068 -0.057400 0.06770
=ns2.novatelbg.n 83.228.93.76 2 64 377 0.01001 -0.055290 0.06058
ntpdc has also a non-interactive interface, handy if there is a need for requests to a ntpd to be scripted. To check ntpd server peers non-interactively:
freebsd# ntpdc -p localhost
===================================================
kgb.comnet.bg 83.228.93.76 2 64 377 0.00284 -0.043157 0.06184
=billing.easy-la 83.228.93.76 2 64 377 0.01059 -0.042648 0.05811
*ns2.novatelbg.n 83.228.93.76 2 64 377 0.00996 -0.041097 0.06094
ntpdc has plenty of other ntpd query options, e.g. :
ntpdc> help
ntpdc commands:
addpeer controlkey fudge keytype quit timeout
addrefclock ctlstats help listpeers readkeys timerstats
addserver debug host loopinfo requestkey traps
addtrap delay hostnames memstats reset trustedkey
authinfo delrestrict ifreload monlist reslist unconfig
broadcast disable ifstats passwd restrict unrestrict
clkbug dmpeers iostats peers showpeer untrustedkey
clockstat enable kerninfo preset sysinfo version
clrtrap exit keyid pstats sysstats
ntpdc is an advanced query tool for ntpd , servers. Another tool exists called ntpq which syntax is almost identical to ntpdc . The main difference between the two is ntpq is a monitoring tool mostly used just for monitoring purposes, where ntpdc can also change plenty of things in the server configuration.
For people who want to learn more on ntpd the man page is a great reading , containing chapters describing thoroughfully exactly how NTPD time servers operate, etc.
Tags: basis, basis system, boots, comnet, configure, daemon, doesn, echo echo, europe, file, flags, freebsd handbook, freebsd kernel, freebsd system, freebsd world, gnu linux, handbook, iburst, information, level, Linux, localhost, maxpoll, nbsp, necessery, need, ntp servers, ntpd, ntpdate, ntpdc, ntpq, package, pool, quot, root, rpf, server clock, server hosts, system boot, time, timing, tool, variables, writting, YES
Posted in FreeBSD, System Administration | 1 Comment »