Posts Tagged ‘proxy’

Trip To Amsterdam (TTA)

Tuesday, March 3rd, 2009

Saint Nicolas Roman Catholic Church near Amsterdam trainstation pictureOn Tuesday Zlati (A friend of mine introduced to me by Father Veliko), came to Arnhem. The plan was that he came on Tuesday here and afterwards in Wednesday morning the Trip to Amsterdam was going to happen. First we had settled that he will be in Arnhem in 12:00 o’clock. So Around 10:50 I walked down the way to the trainstation. I was on my way when Zlati ringed and told that he still, haven’t catched the train and he is not going to make it for 12:00, though he will be on Arnhem Central Station in 04:35 in the afternoon. I came back to home and on my way bought some apples as well as a oily sweet thing from the Turkish shop “Sultan” 🙂

Around 3 I took my way to the city center again, on my way I had toleave Sali’s laptop in his home. I had taken his laptop to re-install Windows and setup his Windows in Bulgarian as well as configure it to be able to watch Bulgarian TV channels online.
In order to achieve that I used a proxy donated to me by Amridikon. Thanks Amri!

To make Windows Vista Home Premium to Bulgarian I had to use a small proggie “Vista Change Language 1.0”. I had to burn the program to a CD and boot into it and then use the downloaded language pack to change the vista text language to Bulgarian. I did so all went well, unfortunately after an upgrade the text in the menus did screw up. So I have to boot again in the Vista Change Language 1.0 boot CD and revert it back to Bulgarian.
Then I had to disable Windows Vista updates in order to prevent the same language mess up to occur again. This was a little out of the topic, but I decided it’s nice to have it on paper.

So back to where I was with my TTA .. I took Zlati from the train station,we went to Sali and he treated us with some kind of traditional turkish soup meal. The soup was quite nice btw. He was extremely happy that he could watch Bulgarian TV’s online through the bg.gledai.tv website. I was glad to that God helped me and blessed me in succeeding in all the things I mentioned above. Afterwards we went with Zlati and Koko to Albertheijn picked up a beer and a couple of other things. Then I and Zlati went to my place where we used my notebook to research about places of Interest, we would like to attend in Amsterdam. We went to bed around 2 o’clock at night.

At the morning we went to the train station. I suggested that we go a little earlier because I thought, well it might be better to be earlier in the city for to have more time to walk and take a look at its significant things in it. We were on the train station 8:10 and had the intention to take the first train at 8:29, however God had other plans for that.It seemed that we have to wait and buy a ticket for after 9:00, otherwise Zlati couldn’t use his train card for my discount.He was quite irritated by the fact that I suggested that we went to the train station so early since he was quite sleepy in the morning because we went to bed so late.

Anyways I got a coffee from the trainstation waiting-room coffee machine.And, eh the coffee there is expensive, be careful if you travel in the Netherlands by train.

The coffee costed 1.50 per cappuchino, huh … We catched a train in 9:29 and we were in the capital of Amsterdam in 10:40.
I was so excited! Yes the trip worthed the price of 16.30 EUR (with the 40% discount). Amsterdam is a really nice city, especially considering it’s architecture. And I saw such a big shops and so many things to choose from … The whole city is full of canals and boats are traveling through it.
We went to music store, wow there was so much music in it.
We entered a lot of Catholic Churches in one of the Catholic Churches there was an orthodox icon of St. Nickolas! So I made the sign of the cross and prayed the Saint to pray God for me the sinner.
With our arrival right after we went out of the central station I saw a bookstore,so I proposed Zlati to enter. It seemed that was a protestant Christian bookstore. Even though a protestant one the people there at least were believing in our Lord and Saviour Jesus Christ.

I had a small chat with one of the guys asking if they have Orthodox Bible, It seemed they haven’t so I started telling him about the advantages of being Orthodox Christian. I explained him how I became orthodox after God gave me the faith and transformed my life.
The bookstore had a free/coffee and tea.So each me and Zlati took a cappuchino. It was so nice God gave me a hot drink in the Early morning in Amsterdam.
A lot of people are insane in that place, I saw a lot of pod smokers on the street.

On a lot of places the air had that typical pod stell. We saw a lot of Museums, we tried to use a citymap although in a lot of cases  un-succesful. We saw so many Churches, Madam Tusad’s museum,as well as Anne Frank museum, the tulip museum.
There was also sex, museums we saw on our way and even this freaks had gay museum. We saw some road building in progress where a couple of people were building a road on top of pillars, right above the water! 🙂 The city is full of old buildings most of which originating from 16th century. The Architecture is really amazing. The parks and everything and the terraces had that typical European style which I’ve seen in movies showing people from the 18thor 19th century drinking coffees on the balconies. We took a lot of pictures. Unfortunately I still haven’t taken the pictures from Zlati. We entered into a shop which was selling buddhist, hindu and indian statues and souvenirs to warm a bit as the weather outside was coldy.
There we had a nice chat with the storekeeper, about religion and about my Orthodox faith in Our Lord Jesus! He mentioned that near around there is an Syrian Orthodox Church. So went to seek for it. After some rambling we found it but unfortunately it was already closed the time was quite late over 18:00, so it was quite normal to be closed.The style of the Church didn’t really much differentiated from the rest of the Catholic Churches.

Earlier we went into a Church, whether they had that modern exposition, again we went their to warm ourselves (it was such a cold day).

The Church inside was nice but the pictures,they was selling on the expo was really terrible, a lot of sado-mazo and perverted motives in the pictures …

I was saddened to see that they have de-sacrated a holy place like that. Well it’s true that the Roman catholics stepped aside from the orthodox faith some time ago but still they are believing Christians and therefore there temples are holy to some degree too … therefore such an abomination really shouldn’t happen.

The good thing was that in the Church they even had made toilets inside the church we could use 🙂
The Church wall paintings were displaying the way our Lord Jesus has walked on it’s way to final execution by the jews, carrying his cross on the way to Golgotha.

Around 18:30 we went to the street where the so famous prostites and drug addicts street was the “RED LIGHTS” – so famous all around the world ….

I couldn’t believed my eyes, prostites staying behind windows half naked waiting for a customer to hire them for sex …I have heard about that place but I really couldn’t imagine it could legally exist in the center of a metropolitan city like Amsterdam.

We walked in that “wicked” part of the city for around hour.
There were all kind of junkies people who looked really criminal, the prostitutes on the windows. Sex shops, sex video rooms, you name it .. all the disgusting stuff you could imagine. After this walk we went to the train station around 8:00 and took the train back to Arnhem. The whole day went quite flawless,God has heard our prayer to keep us from evil and give us safe journey.The whole trip was really relaxing for me! Praise the Lord for his great mercy towards me the sinner for giving my eyes to see all this things!

How to clear Squid Proxy Cache on Debian and Ubuntu

Saturday, July 16th, 2011

Squid proxy cache clear logo

It was necessery to clean up some squid cache for some proxy users on a Debian host. Until now I’ve used to run only custom build Squid server on Slackware Linux.

Thus I was curious if Debian guys were smart enough to implement a proxy cache cleaning option as an option to be passed on to squid’s init script.

Honestly I was quite suprised squid clear cache option is not there;

squid-cache:~# /etc/init.d/squid3
Usage: /etc/init.d/squid3 {start|stop|reload|force-reload|restart}
squid-cache:/#

As it was not embedded into init script I still hoped, there might be some Debian way to do the proxy cache clearing, so I spend some 10 minutes checking online as well as checked in squid3‘s manual just to find there is no specific command or Debian accepted way to clean squid’s cache.

Since I couldn’t find any Debian specific, way I did it the old fashioned way 😉 (deleted directory/file structures in /var/spool/squid3/* and used squid’s -z option, to recreate the swap directories.

Here is how:

squid-cache:~# /etc/init.d/squid3 stop;
squid-cache:~# rm -Rf /var/spool/squid3/*;
squid-cache:~# squid3 -z; /etc/init.d/squid3 start

Finally I was quite amazed to realize, there was not even a crontab script to periodically clear and re-create proxy cache.

My previous experience with maintaning an office Squid proxy cache has prooved, that periodic cache clean ups are very helpful, especially to resolve issues with cached unreslovable DNS entries in the server.
Clearing up squid cache every week or something, guarantees that failure to resolve certain hosts at certain times would not stay unresolvable like forever 😉

In that manner of thougths, I decided to put the following crontab which will twice a month clear up proxy’s cache, to possibly solve some failed squid DNS issues.

squid-cache:~# crontab -u root -l > file;
echo '00 04 12,26 * * /etc/init.d/squid3 stop; rm -Rf /var/spool/squid3/*; squid3 -z; /etc/init.d/squid3 start >/dev/null 2>&1'
>> file; crontab file

By the way, implementing the squid clear cache in Debian and Ubuntu ‘s init scripts and putting a periodic proxy clear up cron, seems like a feature worthy to be proposed to the distro developers and hopefully be embbed in some of the upcoming distro releases 😉

How to generate user password for digest_pw_auth SQUID digest authentication

Wednesday, July 6th, 2011

Squid Proxy pass prompt / real squid fun picture

I needed to generate new password for proxy user configured on SQUID proxy server configured with digest user authentication.
My dear colleague was kind to provide me with the below script, which generates the one line string which needs to go to the squid user password file:

#!/bin/sh
user="$1";
realm="$2";
pass="$3";
if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
echo "Usage: $0 user password 'realm'";
exit 1
fi
ha1=$(echo -n "$user:$realm:$pass"|md5sum |cut -f1 -d' ')
echo "$user:$realm:$ha1"

You can alternatively download the squid_generate_pass.sh script here

The script accepts three arguments;
proxy-server:~# ./squid_generate_pass.sh
Usage: ./squid_generate_pass.sh user password 'realm'

Thus to generate a new user and password and insert it immediately into let’s say a squid configured user/pass file in /etc/squid3/users execute command:

proxy-server:~# ./squid_generate_pass.sh admin_user MySecretPassword 'Squid_Configured_Realm'
>> /etc/squid3/users

Where Squid_Configured_Realm depends on the realm name configured in squid.conf, for example if squid.conf includes some auth configuration similar to:

auth_param digest program /usr/lib/squid3/digest_pw_auth -c /etc/squid3/users
auth_param digest children 2
auth_param digest realm My_Proxy_Realm
acl localusers proxy_auth REQUIRED

The realm script argument should be My_Proxy_realm . If squid_generate_pass does completes without errors, it should add a line to /etc/squid3/users file similar to:

proxy-server:~# cat /etc/squid3/users
admin_user:My_Proxy_realm:3bbcb35e505c52a0024ef2e3ab1910b0

Cheers 😉