SHARING PAKET INTERNET in LINUX

Posted in Uncategorized on April 7, 2008 by islamixcity

untuk sharing paket internet dari linux server ke client, cukup tuliskan :

iptables -A POSTROUTING j- MASQUERADE -t nat -s #ipclient

di konsole

EDIT /etc/init.d/rc.local

beressssss

Enable IP Forwarding LINUX

Posted in Uncategorized on April 6, 2008 by islamixcity

forwarding is enabled or not:
Using sysctl:

sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0

or just checking out the value in the /proc system:

cat /proc/sys/net/ipv4/ip_forward
0

As we can see in both the above examples this was disabled (as show by the value 0).

Enable IP Forwarding on the fly

As with any sysctl kernel parameters we can change the value of net.ipv4.ip_forward on the fly (without rebooting the system):

sysctl -w net.ipv4.ip_forward=1

or

echo 1 > /proc/sys/net/ipv4/ip_forward

the setting is changed instantly; the result will not be preserved after rebooting the system.

Permanent setting using /etc/sysctl.conf

If we want to make this configuration permanent the best way to do it is using the file /etc/sysctl.conf where we can add a line containing net.ipv4.ip_forward = 1

/etc/sysctl.conf:
net.ipv4.ip_forward = 1

if you already have an entry net.ipv4.ip_forward with the value 0 you can change that 1.

To enable the changes made in sysctl.conf you will need to run the command:

sysctl -p /etc/sysctl.conf

On RedHat based systems this is also enabled when restarting the network service:

service network restart

and on Debian/Ubuntu systems this can be also done restarting the procps service:

/etc/init.d/procps.sh restart

Numerical Input in Delphi

Posted in Uncategorized with tags , , , , , on Maret 10, 2008 by islamixcity

If you want to limit the input of a TEdit to numerical strings only, you can discard the “invalid” characters in its OnKeyPress event handler. Let’s assume that you only want to allow positive integer numbers. The code for the OnKeyPress event handler is as follows:

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  // #8 is Backspace
  if not (Key in [#8, '0'..'9']) then begin
    ShowMessage('Invalid key');
    // Discard the key
    Key := #0;
  end;
end;

Enable Tab Completion in Debian

Posted in Uncategorized with tags , , , on Desember 14, 2007 by islamixcity

autocompletion is literally what it’s name might suggest, you start to type something and it’s completed for you.This is usually enabled for simple things such as file and directory names, and by default it will be activated by the “TAB” key.For example if you wish to look at the system’s password file you might wish to run:

less /etc/passwd

To save keystrokes you can actually type:

lesTAB /eTAB/passTAB

As you proceed to type the words pressing TAB will automatically complete things for you.

In the Debian bash package there is a file installed called /etc/bash_completion, this adds a lot more useful behaviours to bash including:

  • Auto completion of hostnames, for SSH
  • Auto completion of Debian specific utilities

To cause your shell to use it run the following command, then login again:

echo ‘. /etc/bash_completion’ >> ~/.bashrc

This will now give you a lot more completions, most usefully I find the following :

apt-get upgTAB

This becomes the familiar “apt-get upgrade“, other apt-get, and dpkg commands suddenly understand completion too, so instead of typing “dpkg --search” you can cut this down to “dpkg --seaTAB“.

To be honest I don’t know the full extent of the completion offered as some of the code in the /etc/bash_completion file is pretty hard to follow, but I know it saves me time.

Why not have a look yourself?

Install Microsoft Fonts on Linux (Ubuntu)

Posted in Uncategorized with tags , , , , , , , on Desember 5, 2007 by islamixcity

Saat anda menggunakan aplikasi Open Office pada Linux, anda mungkin melihat beberapa font terlihat beda. Itu dikarenakan sistem operasi Linux (khususnya Ubuntu) secara default tidak terinstall font bawaan Microsoft. Pada ubuntu, hal ini bisa diatasi dengan menginstall beberapa font Microsoft secara manual. Instalasi ini hanya dapat dilakukan apabila komputer (PC) anda terhubung langsung dengan internet. Beberapa Font yang dapat diinstall antara lain adalah :
* Andale Mono
* Arial Black
* Arial (Bold, Italic, Bold Italic)
* Comic Sans MS (Bold)
* Courier New (Bold, Italic, Bold Italic)
* Georgia (Bold, Italic, Bold Italic)
* Impact
* Times New Roman (Bold, Italic, Bold Italic)
* Trebuchet (Bold, Italic, Bold Italic)
* Verdana (Bold, Italic, Bold Italic)
* Webdings
Cara installnya cukup mudah. Buka konsole (pada kubuntu) atau terminal (pada ubuntu), kemudian ketikkan :

$sudo apt-get install msttcorefonts

Ini hanya akan menginstall font standar yang telah disebutkan di atas. Apabila anda ingin menginstall font lain, caranya cukup copy font anda ke directory

~/.fonts/

Setelah selesai menginstall / copy font, LogOut atau restart komputer anda. Atau apabila anda tidak ingin merestart komputer, cukup ketikkan kode di bawah pada konsole :

$sudo fc-cache -fv

selamat mencoba

PIDGIN MESSENGER VIA SQUID

Posted in Uncategorized with tags , , , , , on November 14, 2007 by islamixcity

bagi para pengguna proxy server SQUID pemula, biasa dijumpai masalah pada koneksi Messenger semacam Yahoo Messenger, PIDGIN ataupun GTalk. Error yang sering muncul kurang lebih sebagai berikut :

HTTP proxy server forbids port 5050 tunneling

Untuk mengatasinya, lakukan langkah2 berikut ini :

1. Buka file konfigurasi squid (/etc/squid/squid.conf)

2. Cari baris “acl CONNECT method CONNECT”

3. Tambahkan baris berikut ini :

acl port_saya port 5050

http_access allow CONNECT port_saya

4 . Tutup SQUID.CONF

5. Restart service SQUID (/etc/init.d/squid restart)

6. Set proxy di pidgin, dengan tipe HTTP

7. Selesai, Pidgin siap digunakan

Apabila anda masih mengalami masalah dengan hal tersebut, tinggalkan komentar.

Rancang situs seperti ini dengan WordPress.com
Mulai