PCLinuxOS and Squid netmask warnings…

Hi all.

I have downloaded and configured Squid using PCLinuxOS Control Center…

PCLinuxOS Control Center aka Configure Your Computer

All was well and everything was working just fine however I was receiving silly netmask warnings and some security notifications…

[root@icsserver andrzejl]# service squid restart
Stopping squid: 2012/01/14 19:31:49| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2012/01/14 19:31:49| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2012/01/14 19:31:49| WARNING: For now we will assume you meant to write /24
2012/01/14 19:31:49| aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in ‘192.168.0.1/255.255.255.0’
2012/01/14 19:31:49| ERROR: ‘0.0.0.0/0.0.0.0’ needs to be replaced by the term ‘all’.
2012/01/14 19:31:49| SECURITY NOTICE: Overriding config setting. Using ‘all’ instead.
2012/01/14 19:31:49| WARNING: (B) ‘::/0’ is a subnetwork of (A) ‘::/0’
2012/01/14 19:31:49| WARNING: because of this ‘::/0’ is ignored to keep splay tree searching predictable
2012/01/14 19:31:49| WARNING: You should probably remove ‘::/0’ from the ACL named ‘all’
2012/01/14 19:31:49| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2012/01/14 19:31:49| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2012/01/14 19:31:49| WARNING: For now we will assume you meant to write /32
…. [ OK ]
init_cache_dir … Starting squid: . [ OK ]
[root@icsserver andrzejl]#

Squid worked as expected but the annoying warnings would not let me forget about the whole thing… So I have decided to investigate.

As it turns out those are the errors that occur when You are using squd 3 with a squid 2 config file…

PCLinuxOS has squid 3 in the repos…

[andrzejl@icsserver ~]$ rpm -qa | grep squid
squid-3.1.16-1pclos2011
[andrzejl@icsserver ~]$

BUT the beginning of it’s config file says…

# WELCOME TO SQUID 2

this calls for few changes in the squid config file which in PCLinuxOS can be found here:

/etc/squid/squid.conf

First we have to find out what CIDR is…

With this knowledge we can start editing squid config file as root.

This line:

acl mynetwork src 192.168.0.1/255.255.255.0

was changed to

acl mynetwork src 192.168.0.0/24

and the amount of warnings was reduced significantly:

[root@icsserver andrzejl]# service squid restart
Stopping squid: 2012/01/14 19:36:11| ERROR: ‘0.0.0.0/0.0.0.0’ needs to be replaced by the term ‘all’.
2012/01/14 19:36:11| SECURITY NOTICE: Overriding config setting. Using ‘all’ instead.
2012/01/14 19:36:11| WARNING: (B) ‘::/0’ is a subnetwork of (A) ‘::/0’
2012/01/14 19:36:11| WARNING: because of this ‘::/0’ is ignored to keep splay tree searching predictable
2012/01/14 19:36:11| WARNING: You should probably remove ‘::/0’ from the ACL named ‘all’
2012/01/14 19:36:11| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2012/01/14 19:36:11| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2012/01/14 19:36:11| WARNING: For now we will assume you meant to write /32
…. [ OK ]
init_cache_dir … Starting squid: . [ OK ]
[root@icsserver andrzejl]#

Next I removed this line

acl all src 0.0.0.0/0.0.0.0

which is built in the Squid anyway…

This reduces the warning messages even more:

[root@icsserver andrzejl]# service squid restart
Stopping squid: 2012/01/14 19:39:14| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2012/01/14 19:39:14| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2012/01/14 19:39:14| WARNING: For now we will assume you meant to write /32
…. [ OK ]
init_cache_dir … Starting squid: . [ OK ]
[root@icsserver andrzejl]#

Final step is to edit this line:

acl localhost src 127.0.0.1/255.255.255.255

to read

acl localhost src 127.0.0.1/32

After editing the config file squid is restarting without any warning and everything is “peachy”…

[root@icsserver andrzejl]# service squid restart
Stopping squid: …. [ OK ]
init_cache_dir … Starting squid: . [ OK ]
[root@icsserver andrzejl]#

My config file contains few extra modifications. Please use it if You feel like it after editing it to reflect Your network settings.

Hope this helps somebody someday.

Regards.

Andy

Back to the roots – Starcraft – Final battle in the Terran campaign… [VIDEO]

Hi all.

Some time ago I have decided to buy Starcraft (Brood War version) – game by Blizzard Entertainment. It was cheap as the game is not new (as in recently released) plus it was a 2nd hand purchase. To make it playable I used the Crossover software that I got for free long time ago.

Couple of days ago I decided to start playing Starcraft again. It’s a really good game. It’s like Warcraft 2 but in the space. While Warcraft is all about might and magic Starcraft is all about power and technology… The game is not better then Warcraft 2. It’s just as good but there are few features that are really cool ie. you can move some of the buildings to a new locations once they were constructed.

Main objectives of the game are to build Your own empire starting from the least advanced structures and troops and work Your way up while going thru a different missions. The last mission in the first episode (Terran campaign) objectives are “Destroy Ion Cannon” and “Raynor must survive”. Second part is easy. Just hide Raynor somewhere in Your camp and tell him to hold positions. First part is much more difficult but still doable. You are situated in the bottom of the map. You have enough resources to defend Yourself for a while but You have to work fast… On the west part of the map there is a red enemy (not very powerful but still can do a lot of harm…) and on the east part of the map there is a white enemy and trust me when I say – be afraid… be very afraid. Those dudes will not let You live in peace. While You MAY try to conquer the red base – don’t really even think about attacking the white base. Yes it’s doable BUT it’s extremely difficult and even tho I succeeded in defeating them in the past – trust me – it’s a suicide mission… plus the objectives say nothing about defeating them… To draft the image of how nasty they are… White dudes will send their troops (a lot) on a regular basis to destroy Your base and if that isn’t enough they will send You a nuclear gift once in a while and those missiles can really do some damage to your camp…

Once I had my base “well defended” and in OKish shape I have decided to build a Cruisers and some Transporters and attack the big ION Cannon which is located far up north… and I have succeeded ;).

It may look easy on the video but trust me it’s NOT… One mistake may lead to restarting the mission from the scratch… and I have been there many times before I have gathered enough experience to succeed…

Enjoy the video. I am recommending the game to anyone.

Regards.

Andy

Upgrading WordPress software manualy to the latest version.

Hi all.

One of the PCLinuxOS policies is “DO NOT install anything from outside the repo” and I agree with that. Installing anything from outside the repo is the best way of borking Your system. Application from outside PCLinuxOS repository can cause stability issues. It’s also a security risk… BUT in this case we are talking about a blogging software. If You run WordPress on Your own machine and it’s accessible to anyone from outside (the internet) then not keeping it current is like asking someone to use a old vulnerability (exploit): to gain control over Your machine and change it into a spambot, DDOS bee or hack another machine from it…

PCLinuxOS has WordPress in it’s repository…

[andrzejl@icsserver ~]$ apt-cache search wordpress
wordpress – WordPress Open Source Forum (CMS)
[andrzejl@icsserver ~]$

unfortunately it’s not being upgraded very often…

[andrzejl@icsserver ~]$ rpm -qa | grep wordpress
wordpress-3.1.3-1pclos2011
[andrzejl@icsserver ~]$

considering that 3.3 is the latest stable version of WordPress…

How to keep WordPress current?

First of all I am using the rss feed reader Akregator (any other rss feed reader will do just fine) to receive updates about WordPress development. Rss feed address is:

http://wordpress.org/news/feed/

Then whenever I get information about the new release of the WordPress I run this command (just copy / paste it if You are using default PCLinuxOS WordPress setup) from the terminal followed by root password:

su -c "cd /var/www/html/ && wget -c http://wordpress.org/latest.tar.gz && tar xvzf ./latest.tar.gz && rm -f ./latest.tar.gz"

Wordpress Upgrade 001

Command syntax explained:

su -c ""

Run the command inside the “” as a root user.

&&

Wait till previous command finished successfully before going any further.

cd

Enter the folder.

/var/www/html/

Default folder in which WordPress is being installed on PCLinuxOS. If You have changed the location of the WordPress on Your installation You need to amend this part of the command.

wget -c

Download the file with the option to continue later if download got interrupted for whatever reason.

http://wordpress.org/latest.tar.gz

Static address for downloading latest stable release of wordpress in tar.gz file.

Wordpress Upgrade 002

tar xvzf

Extract tar.gz archive.

./latest.tar.gz

Path to the tar.gz archive that we have just downloaded ./ in front of the file name means that it’s in the same directory that we are currently in.

Wordpress Upgrade 003

rm -Rf

Remove without asking for permission.

PLEASE be extremely careful. Guess what happens when

rm -Rf /

is ran? Yeah… Nothing good… You can say buh bye to Your current installation and ALL the files… In other words.. DON’T! πŸ™‚

Wordpress Upgrade 004

After the command finished open Your browser (I am using Firefox 9.0.1 here) and navigate to Your WordPress blog. Right click and choose View Page Source from the drop-down menu.

Wordpress Upgrade 005

You should be able to see similar entry as the one highlighted on the screenshot above. Your WordPress is upgraded to the latest version.

You can also check Your WordPress version in the Dashboard section of Your WordPress Administration Panel.

Sometimes after the upgrade of the WordPress You need to upgrade Your database. You will be asked for it when logging into the Admin’s panel. Nothing to worry about. One click in a browser does it for You. Never had any problems with this.

Wordpress Upgrade 006

This is how I upgrade WordPress software on my server. Brain is needed when following my method. I do not take any responsibility if You bork something.

Hope this helps somebody someday.

Regards.

Andy

Edit: Another reason to keep WordPress updated.

Santa's bad day…

When four of Santa’s elves got sick, the trainee elves did not produce toys as fast as the regular ones, and Santa began to feel the Pre-Christmas pressure.

Then Mrs. Claus told Santa her Mother was coming to visit, which stressed Santa even more.

When he went to harness the reindeer, he found that three of them were about to give birth and two others had jumped the fence and were out, Heaven knows where. Then when he began to load the sleigh, one of the floorboards cracked, the toy bag fell to the ground and all the toys were scattered. Frustrated, Santa went in the house for a cup of apple cider and a shot of rum. When he went to the cupboard, he discovered the elves had drunk all the cider and hidden the liquor.. In his frustration, He accidentally dropped the cider jug, and it broke into hundreds of little glass pieces all over the kitchen floor. He went to get the broom and found the mice had eaten all the straw off the end of the broom. Just then the doorbell rang, and an irritated Santa marched to the door, yanked it open, and there stood a little angel with a great big Christmas tree.

The angel said very cheerfully, ‘Merry Christmas, Santa. Isn’t this a lovely day? I have a beautiful tree for you. Where would you like me to stick it?’

And thus began the tradition of the little angel on top of the Christmas tree.

Not very many people know this

Made me chuckle… πŸ˜€

Source.

Regards.

Andy

New OP-erators on the #PCLinuxOS-PL channel.

Hi all.

Polish PCLinuxOS channel was created almost 3 years. Then I got rid of it for over 6 months due to the lack of interest of users. Later I’ve recreated it again simply because the Polish community of PCLinuxOS (which got slightly bigger) and their Friends needed a nice place to hang around, chat and support each other.

Channel was created with the idea of being one of many international channels in the PCLinuxOS network. Since there was a problem in the past with that I have setup JohnW_57 – good friend of mine – as a co-founder of the channel. This way if anything happens to me – channel will continue to exist and no one will have the right to claim any rights to the ownership of the channel but the guy who owns / manages all the official PCLinuxOS channels.

For all this time I have been managing this channel by myself. I have compiled and configured MISIASTY – my personal BOT (from a beta 2.8.x tarball to get SSL and IPV6 support) – one of the channel operators. Bot helps me to get rid of the people that use foul language, misbehave, flood and spam. He also greets users, informs, annoys and humors them ;). MISIASTY is a great helper BUT sometimes I am not on the channel and even tho the bot is very smart and is learning fast – he could not handle certain situations himself so I have decided that I will give extended privileges (OP-erator’s status) to 3 other users: Enlik, Rsanti and Wilku.

I trust that they will be able to handle channel management when I am not in the channel or when I am away from the keyboard. This way the channel should operate smoother and all the pests that have a problem with following the rules will be removed immediately without the need of me being there (or waiting for me).

Regards.

Andy

Google… Evil corporation… I don't want You here.

Hi all.

Just in case anyone wonders why my page will not work in the Google Translate tools… I have blocked it. I don’t like Google. If You haven’t know it by now – Yes it’s true. I have blocked all the major indexing tools from accessing this page ever since I have created it. Not just by ticking a box in the WordPress options. Since it’s my server I could do more then that and so I did… I don’t want them here. I don’t need them here. Simple as that.

They started out with a “Don’t be Evil” motto but that was a LONG time ago… I was using their products then… Google was very cool. Google was a friend… Boy was I naive…

http://www.scroogle.org/doctorow.html

Regards.

Andy