CheckPoint NTP time sync configuration

To set NTP in CheckPoint SecurePlatform (SPLAT) system run following command:

[code]
ntp -n 1800 time.nist.gov ntp.eenet.ee ntp.estpak.ee
[/code]

You may also use IP addresses:

[code]
ntp -n 1800 64.236.96.53 193.40.133.142 192.98.49.10
[/code]

This command will create a config file in /etc/sysconfig/ntp and enable ntpd on boot.

The following file was produced by example command:
[code]
SERVER1=64.236.96.53
SERVER2=193.40.133.142
SERVER3=192.98.49.10
INTERVAL=1800
MD5_SECRET=
USE_NTP=true
[/code]

You may want to confirm ntpd will be started at boot by running:
[code]
chkconfig –list ntp
[/code]

Command should display:
[code]
ntp 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[/code]

Xperia Arc S distorted sound – earpiece replacement

After a year of active usage of my SE Xperia Arc S, I have faced a problem when sound, coming from a small front speaker became distorted. All voices had a buzzing effect as well.
Fortunately you can easily find an earpiece replacement for 2-3$ on ebay.
I have even bought a set with tools, to disassemble my phone. (Search for “Replacement Ear Earpiece Speaker+Tool for Sony Ericsson X12 Xperia Arc S” )

The replacement procedure in pretty simple, you just have to be careful and have a bit of patience. No soldering is required for the replacement.

Here is a procedure to replace the front speaker:

1. Detach the back cover, remove Battery, SIM and memory cards.

2. Unscrew 4 torx (star) shaped and 2 cross shaped bolts. Open HDMi cover.

SE Arc S back

3. Separate the covering panel. This can be easily done using your nail, or special tool starting from one of the phone corners.
Move the tool in clockwise direction and make a small gap between the screen and silver panel on the side of the phone.
Then increase the gap gradually until the panel comes off. Be gentle doing this as the side frame is pretty thin .

SE Arc S back
SE Arc S back

4. With the panel removed, locate the camera and gently bend it to the left, it should come off very easily.

SE Arc S back

5. On the right of the camera hides the earpiece we are going to replace. Move the small contact plate to the left, and pull it up gently. This will uncover the front speaker.

SE Arc S back

6. Extract the ear piece by using a flat screwdriver or an plastic tool, included in the earpiece set. It has a sticky coating on the other side. Remember the position of the speaker.

SE Arc S back

7. Put new earpiece in, press it down the socket, so it is firmly in place. Place the small covering plate back, make sure it is locked on the left side as it was before.
Position the camera back on it’s place, you may hear it clicks when locked.

8. Put the covering silver panel back on the base on the phone, as before – push it firmly down, so there is no gap left, do it gradually – moving clockwise around the borders.

9. Insert memory, SIM and Battery back. Turn on the phone and test the earpiece. Congratulations!

CheckPoint VPN – Wrong value for: Group Description

While debugging a VPN you an error in the log, that says:

IKE Main Mode Failed to match proposal: Transform 3DES / AES, SHA1 / MD5, Pre-shared secret, Group 1 (1024 bit)

This error means that you have a mismatch in Phase 1 settings on the other side of the VPN.
“Group Description” should not confuse you – mismatch is not necessarily in Diffie–Hellman group value.

If you have access to the remote device, check the settings yourself, or contact its maintainer.

kernel: e1000e eth0: Error reading PHY register

In recent CentOS version 6.3 is an unresolved bug, which causes the network card to freeze the server.

Following message appears in /var/log/messages

[code]
kernel: e1000e 0000:02:00.0: eth0: Error reading PHY register
[/code]

To work around the problem you will need to turn off Active-State Power Management (ASPM)
(Feature that saves power in the Peripheral Component Interconnect Express (PCI Express or PCIe) subsystem by setting a lower power state for PCIe links when the devices to which they connect are not in use)

For GRUB bootloader edit the following file: /boot/grub/grub.conf and append pcie_aspm=off to the end of kernel boot line.

For example:
[code]
kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=81e9e0a2-0a51-4d75-955d-909aaf848192 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_DM rd_MD_UUID=c6855f45:016a63bb:2d79bfb2:07371ed8 rd_NO_LVM rd_MD_UUID=5d5a434e:6c20cfcd:51340c3f:29c29151 pcie_aspm=off
[/code]

To verify the change, reboot the server and run the following command:

[code]
dmesg | grep PCIe
PCIe ASPM is disabled
[/code]

If your output is different, the change in grub.conf did not take an effect.

Add / substract time in bash

To add or substract any amount of seconds, minutes, hours, days, weeks, months or years to/from current date use the Linux date command:

[code]
date -d ‘+2 hour’
[/code]

If you want to use specific date as a base:

[code]
date -d ‘2010-01-01 + 2 year’
[/code]