mercoledì 18 novembre 2009

Apple addicted

After more than ten years of love I decided to leave my preferred operating system, Linux in favour of MAC OSX. Linux (Fedora) will be still live in a virtual machine of my MacBook Pro.

Welcome back home Steve!

The botton "Home" of our iPhone, a small sign to give the welcome back to the visionary Apple CEO!

martedì 21 aprile 2009

Linux

This method should work for any unix system, not just linux, assuming you have the ssh clients installed

First, create a tunnel from port 8080 on your local machine to port 3128 on the proxyserver or socks server:


ssh -N -L 8080:local.peppe.com:3128 socks.proxy.com &

You will be prompted for your unix username and password.

lunedì 12 gennaio 2009

Crypt password with Python cm interpreter

To assign an initial password, use the following steps:

- Start the command line Python interpreter with the python command. It displays the following:

Python 2.2.2 (#1, Dec 10 2002, 09:57:09)
[GCC 3.2.1 20021207 (Red Hat Linux 8.0 3.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

- At the prompt, type the following (replacing password with the password to encrypt and salt with a combination of exactly 2 upper or lower case alphabetic characters, digits, the dot (.) character, or the slash (/) character such as ab or 12:

import crypt; print crypt.crypt("password","salt")

- The output is the encrypted password similar to 12CsGd8FRcMSM. Type [Ctrl]-[D] to exit the Python interpreter.

Cut and paste the exact encrypted password output, without a leading or trailing blank spaces, into the following command:

usermod -p "encrypted-password" username

IP Phone OID

1.3.6.1.4.1.9.9.156.1.2 | ccmPhoneInfo

1.3.6.1.4.1.9.9.156.1.2.1 | ccmPhoneTable

1.3.6.1.4.1.9.9.156.1.2.1.1 | ccmPhoneEntry

1.3.6.1.4.1.9.9.156.1.2.1.1.1 | ccmPhoneIndex

1.3.6.1.4.1.9.9.156.1.2.1.1.2 | ccmPhonePhysicalAddress

1.3.6.1.4.1.9.9.156.1.2.1.1.3 | ccmPhoneType

1.3.6.1.4.1.9.9.156.1.2.1.1.4 | ccmPhoneDescription

1.3.6.1.4.1.9.9.156.1.2.1.1.5 | ccmPhoneUserName

1.3.6.1.4.1.9.9.156.1.2.1.1.6 | ccmPhoneIpAddress

1.3.6.1.4.1.9.9.156.1.2.1.1.7 | ccmPhoneStatus

1.3.6.1.4.1.9.9.156.1.2.1.1.8 | ccmPhoneTimeLastRegistered

1.3.6.1.4.1.9.9.156.1.2.1.1.9 | ccmPhoneE911Location

1.3.6.1.4.1.9.9.156.1.2.1.1.10 | ccmPhoneLoadID

1.3.6.1.4.1.9.9.156.1.2.1.1.11 | ccmPhoneLastError

1.3.6.1.4.1.9.9.156.1.2.1.1.12 | ccmPhoneTimeLastError

1.3.6.1.4.1.9.9.156.1.2.1.1.13 | ccmPhoneDevicePoolIndex

1.3.6.1.4.1.9.9.156.1.2.1.1.14 | ccmPhoneInetAddressType

1.3.6.1.4.1.9.9.156.1.2.1.1.15 | ccmPhoneInetAddress

1.3.6.1.4.1.9.9.156.1.2.1.1.16 | ccmPhoneStatusReason

1.3.6.1.4.1.9.9.156.1.2.1.1.17 | ccmPhoneTimeLastStatusUpdt

1.3.6.1.4.1.9.9.156.1.2.1.1.18 | ccmPhoneProductTypeIndex

1.3.6.1.4.1.9.9.156.1.2.2 | ccmPhoneExtensionTable

1.3.6.1.4.1.9.9.156.1.2.2.1 | ccmPhoneExtensionEntry

1.3.6.1.4.1.9.9.156.1.2.2.1.1 | ccmPhoneExtensionIndex

1.3.6.1.4.1.9.9.156.1.2.2.1.2 | ccmPhoneExtension

1.3.6.1.4.1.9.9.156.1.2.2.1.3 | ccmPhoneExtensionIpAddress

1.3.6.1.4.1.9.9.156.1.2.2.1.4 | ccmPhoneExtensionMultiLines

1.3.6.1.4.1.9.9.156.1.2.2.1.5 | ccmPhoneExtensionInetAddressType

1.3.6.1.4.1.9.9.156.1.2.2.1.6 | ccmPhoneExtensionInetAddress

1.3.6.1.4.1.9.9.156.1.2.3 | ccmPhoneFailedTable

1.3.6.1.4.1.9.9.156.1.2.3.1 | ccmPhoneFailedEntry

1.3.6.1.4.1.9.9.156.1.2.3.1.1 | ccmPhoneFailedIndex

1.3.6.1.4.1.9.9.156.1.2.3.1.2 | ccmPhoneFailedTime

1.3.6.1.4.1.9.9.156.1.2.3.1.3 | ccmPhoneFailedName

1.3.6.1.4.1.9.9.156.1.2.3.1.4 | ccmPhoneFailedInetAddressType

1.3.6.1.4.1.9.9.156.1.2.3.1.5 | ccmPhoneFailedInetAddress

1.3.6.1.4.1.9.9.156.1.2.3.1.6 | ccmPhoneFailCauseCode

1.3.6.1.4.1.9.9.156.1.2.3.1.7 | ccmPhoneFailedMacAddress

1.3.6.1.4.1.9.9.156.1.2.4 | ccmPhoneStatusUpdateTable

1.3.6.1.4.1.9.9.156.1.2.4.1 | ccmPhoneStatusUpdateEntry

1.3.6.1.4.1.9.9.156.1.2.4.1.1 | ccmPhoneStatusUpdateIndex

1.3.6.1.4.1.9.9.156.1.2.4.1.2 | ccmPhoneStatusPhoneIndex

1.3.6.1.4.1.9.9.156.1.2.4.1.3 | ccmPhoneStatusUpdateTime

1.3.6.1.4.1.9.9.156.1.2.4.1.4 | ccmPhoneStatusUpdateType

1.3.6.1.4.1.9.9.156.1.2.4.1.5 | ccmPhoneStatusUpdateReason

1.3.6.1.4.1.9.9.156.1.2.5 | ccmPhoneExtnTable

1.3.6.1.4.1.9.9.156.1.2.5.1 | ccmPhoneExtnEntry

1.3.6.1.4.1.9.9.156.1.2.5.1.1 | ccmPhoneExtnIndex

1.3.6.1.4.1.9.9.156.1.2.5.1.2 | ccmPhoneExtn

1.3.6.1.4.1.9.9.156.1.2.5.1.3 | ccmPhoneExtnMultiLines

1.3.6.1.4.1.9.9.156.1.2.5.1.4 | ccmPhoneExtnInetAddressType

1.3.6.1.4.1.9.9.156.1.2.5.1.5 | ccmPhoneExtnInetAddress

venerdì 19 dicembre 2008

X-Forwarded-For

NOTE: Following instruction are for apache >= 2.0


If you need to see the client real IP behind a reverse proxy non transparent connecting to your web server you have to play with LogFormat.

You have to ensure to have the mod_proxy enabled and to configure the LogFormat string.


By default the string is composed:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

To inspect in the header http for the client real ip address add the following:

%{X-Forwarded-For}i

NOTE: Following instruction are for apache >= 2.0

If you need to append anything in the apache response header you have to enable the mod_header in the server config this way:

LoadModule headers_module modules/mod_headers.so

The instruction are quite simple, in the VirtualHost section you want to modify the header you have to add the following instruction:

RequestHeader append peppe_SSL "https"

Where peppe_SSL is the name of the token containing https