Technical blog

August 21, 2010

[How To] Configure GTalk on Kopete

Filed under: linux — Tags: , — paawak @ 01:10

Kopete is one of the most versatile and cool Instant Messenger for Linux. Its lot better and more secure and feature rich than Pidgin. GTalk is based on the open source XMPP Protocol, Jabber compatible.

While entering the new account details, select Jabber:

Select type as "Jabber"

Enter your full email id.

Go to the connection tab. Check the Override default server information check-box and enter the server as talk.google.com, the port as 5223. Also check these check boxes:

  1. Use protocol encryption

  2. Allow plain text password authentication

Connection details

Save this information and you should be done.

Tweaking MySQL on Fedora

Filed under: database, linux — Tags: , — paawak @ 00:57

MySQL is installed on Fedora and most Linuxes by default. Its just about some tweaking before you can use it. I am detailing some of the rather useful commands.

To Install MySQL and start it

mysql_install_db
mysqld_safe &

Make MySQL case insensitive

This is useful when the DB Script is also expected to run on Windows server.

vi /etc/my.cnf

[mysqld]
lower_case_table_names=1

To change the root password

mysql>

update user set password=password(”newPassword”)  where user=’root’;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2  Changed: 2  Warnings: 0

grant all on *.* to ‘root’@'192.168.%’ identified by ‘newPassword’;

FLUSH PRIVILEGES;

Adding a user

mysql>

insert into user (host, user, password) values(’localhost’,'newUser’,password(’xx123′));

insert into  host(host,db,Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv)  values(’localhost’,'dbName’,'Y’,'Y’,'Y’,'Y’,'Y’,'Y’);

grant all on dbName.* to ‘newUser’@'localhost’ identified by ‘xx123′;

FLUSH PRIVILEGES;

[How To] Enable VPN on Linux by PPTP

Filed under: linux — Tags: , , — paawak @ 00:41

PPTP is an wonderful utility to enable VPN on a Linux box. Its secure and compatible with Windows network. I first heard about PPTP from (this wonderful guy called) Nikolaj. I have learnt how to set it up from him.

I am detailing the steps here:

1> Install PPTP

yum install pptp

2> vi /etc/ppp/options.pptp

###############################################################################

# $Id: options.pptp,v 1.2 2005/08/20 13:16:38 quozl Exp $

#

# Sample PPTP PPP options file /etc/ppp/options.pptp

# Options used by PPP when a connection is made by a PPTP client.

# This file can be referred to by an /etc/ppp/peers file for the tunnel.

# Changes are effective on the next connection. See “man pppd”.

#

# You are expected to change this file to suit your system. As

# packaged, it requires PPP 2.4.2 or later from http://ppp.samba.org/

# and the kernel MPPE module available from the CVS repository also on

# http://ppp.samba.org/, which is packaged for DKMS as kernel_ppp_mppe.

###############################################################################


# Lock the port

lock

# Authentication

# We don’t need the tunnel server to authenticate itself

noauth

persist

debug

# We won’t do EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2

refuse-eap

refuse-chap

refuse-mschap


# Compression

# Turn off compression protocols we know won’t be used

nobsdcomp

nodeflate


# Encryption

# (There have been multiple versions of PPP with encryption support,

# choose with of the following sections you will use. Note that MPPE

# requires the use of MSCHAP-V2 during authentication)


# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras

# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o

# {{{

# Require MPPE 128-bit encryption

#require-mppe-128

# }}}


# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec

# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o

# {{{

# Require MPPE 128-bit encryption

#mppe required,stateless

# }}}


lcp-echo-failure 36

lcp-echo-interval 5

lcp-max-failure 0

3> vi /etc/ppp/chap-secrets

# Secrets for authentication using CHAP

# client                  server        secret                        IP addresses


VPNUserName      PPTP       VPNPassword         *

4> Create a file called /etc/ppp/peers/my-company-vpn

#pty “pptp my-company.com –nolaunchpppd”

name VPNUserName

remotename PPTP

require-mppe-128

file /etc/ppp/options.pptp

ipparam my-company-vpn

5> Then on the prompt:

pptp my-company.com call my-company-vpn

6> After 10/15 seconds, on the prompt:

route -n

You should see something like:

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.1.162 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0

87.61.21.102 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0

192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0

If you see ppp0, it means you have successfully connected to the VPN.

7> Add required routes

route add -host 192.168.1.30 gw 192.168.1.162

Where 192.168.1.30 is my internal company IP.

8> After that, to resolve the domains by names

vi /etc/resolv.conf

#to use when connected to the VPN my-company.com

domain my-office.my-company.com

#this, is the most important line: courtesy: Nikolaj

search my-office.my-company.com

#nameserver 192.168.1.1

nameserver 192.168.1.4

nameserver 192.168.1.5

Further reading:

[How To] Rip VCD on Linux

Filed under: linux — Tags: , — paawak @ 00:03

I have always had problems while playing VCDs on my Linux machine. The VCD file system is still not supported by the Linux kernel. But all is not lost. We have an utility called vcdxrip. This is the command:

vcdxrip -i /dev/sr0 -v -p -t 1 –nofiles –nosegments

Here i denotes the mount point of the CDROM drive,  t denotes the Track Number. This way, a VCD can be ripped from a Linux machine. I have tested this on Fedora (10) and it works great.

Powered by WordPress