notepad

Linux

Foundation : What is a Network ?

Foundation : What is a Network ?
apa itu network ??
– fungsi internetwork
– Chunks ( PDU ) yang membuat internetwork
– applikasi yang digunakan untuk network
– design simple network
– osi vs tcp/ip
=========================================
apa itu internet network
1. adalah sebuah platform untuk transfer sebuah data dari titik point A ke point B > Communication
2. digunakan untuk business to deliver information ex, Bank, SP Trading etc.
========================================

Network Component :

Medium = Perangkat
Router
Switch
Cable = UTP, STP, Fiber, Coaxial
PC
Server
NIC
==========================================
Aplikasi yang menggunakan Network
Web Browser = HTTP
Database Applikasi
Instant Messenger
E-mail
Online Games : CS online PB
========================================
Consideration for Network Aplikasi:

Speed
Delay = traffic-nya banyak
Avaibility= suatu network dimana component ada yang fail tetapi servicenya masih jalan
1. Redunancy
Link (backup)
scalability = adalah ukuran network untuk berkembang dan menjadi besar tanpa harus konfigurasi yang intens
( maksudnya contoh sudah ada switch poe – 2 thaun kedpn kita punya voip artinya tidak perlu ganti sw baru).

CSMA/CD = carrir send multipleport access / collusion detection = adalah policy aturan untuk pc saat mengirim data pada saat tertentu
hanya boleh saat tertentu.

==================================================

OSI vs TCP

* pada jaman dolo network tidak ada standart – dolo pake priopetery

dolo pake namanya EDI = electronic data interchange, adalah dolo kalau mau tukar informasi harus 1 brand

===========================

Application L7 = GUI

Presentation L6= Format Data

Session L5 = kalau login saya sebagian Admin, kamu di login sebagai guest itu kita berada di session berapa

Transport L4 = Multiplexing

Network L3 = logical addressing atau IP -address

Data-Link L2 = Physical addressing – mac address

Physical L1  = Biner > 101110 dari gelobang digital menjadi 1012, suatu layer yang bertanggu jawab terhadap mengubahan data
menjadi biner
===============================

L4 OSI – Transport Layer =

* Multiplexing
* Using Ports
* Established End to End Connectivity
Reliable -> TCP = contoh Download ( 3 way handshake )
Unrealiable -> UDP = Real time, Video steaming, Youtube, cisco webex
*L4 PDU = Segment
===================================

L3 OSI – Network Layer =
* Logical addressing
* Provide connectivity and pilihan jalur > ROuting
L3 PDU > Packet
=====================================

L2 OSI – Data Lin
* Physical Addressing
* Typically Has error detection > CRC
* L2 PDU -> Frame (chunk )
============================

L1 OSI – Physical
* Bertanggung jawab untuk meng-translate any medium (perangkat) signal menjadi binary
* Related to cabling
Coax, Twisted pair, UTP STP
Fiber
*L1 PDU > bits


OSI Layer

Understand the layers of OSI:

Application L7 : (GUI) Browser IE, Firefox, Google chrome
CS Online, Warcraft Online games
how to application communicate because well known API = aplication program Interface

Presentation L6    : I have data to send data to send network
Data akan di format into language that webserver understand
(IIS, Apache, Webs)
IE > IIS
Presentation that understand that language
Generate formate mengerti format, jpeg, html, java
Generate encryption

Session L5    : Diffrenrence senssion ( Admin and Guest )

===============================================================================================

Transport Layer L4 : TCP <-> Reliable / Acknowlegdement ( I got it ) so i know that packet got there!
UDP <-> UnReliable / Real Time = VOIP, TV, Youtube, Live Streaming

Application Seperation = PORTS

Network Layer L3 : Logical Address = IP Address

Data-Link Layer L2 : Physical Layer > MAC Address, LLC

Phycical L1 : kable, utp, stp, fiber, coax ( bits ) 1/0 1/0

================================================================================================

L4

Send duit $50

all header = $50 [DATA] application > TCP > Destination Port 443 [Encapsulation] > well know [S-ip address] > S ip add 172.xx  > D-IP add .8 >S -mac > D -mac

L4 Transport : Port : 80 ketika duit dikirim transport layer contoh BOA.com:80

L3 Network   : IP address  Source to destination Path

L2 Datalin   : Source Mac to Destination Mac

======================================
tracert -d http://www.bankofarizona.com

netstats untuk melihat semua opening connection dari komputer saya

Router punya default Route for internet (BGP) how to reach some server on internet!


Setting tanggal dan jam (Date & Time) Linux System

# date
Sat Aug 31 06:24:43 CDT 2013

contoh mau merubah ke tanggal 31 Agustus 2013, jam 18:30

date --set 2013-08-31
date --set 18:30:0


Account Management UNIX

usermod – modify a user account
chmod – change file permission / mode bits
chgrp – change group ownership
chown – change file owner and group
account management
  mantabCapture


Configuring CentOS 6 Remote Access using SSH

Secure Shell (SSH) is a TCP/IP service that provides a secure mechanism for remotely logging into one system over either a local network or the internet from another system. SSH also provides the ability to transfer files between remote systems. When a user logs into a remote CentOS 6 system using SSH, they receive a command prompt allowing them to enter commands on the remote system as if they were sitting at the remote system and had opened a terminal session.

In this chapter we will cover the steps necessary to configure a CentOS 6 system to accept SSH connections. This involves installing the SSH server on the remote system and configuring the firewall to allow SSH connections.

Installing SSH on a CentOS 6 System

In order for a system to accept SSH connections the system must first be running the SSH server. By default, CentOS 6 installs the SSH server so it is not usually necessary to install it. To check if it is installed and running use the following command:

/sbin/service sshd status

This will generate output similar to the following if the service is installed and running:

sshd (pid 9488 9486 1850) is running...

If the service is not installed it can be installed as follows:

su -
yum install openssh-server

The installation process will download the SSH server, install it and start the service running in the background. You may now attempt to connect from a remote system (see below for details of how to do this). If you receive a “connection refused” message when you try to connect you may need to configure the firewall to allow SSH connections to be established to this system.

If the service is installed, but not running, it can be started from the command-line:

/sbin/service sshd start

The service may also be started by using the GUI Service Configuration tool accessed via the System -> Administration -> Services menu option. Once the tool has loaded, simply scroll down the list of services until you reach sshd. Select it and click on the Start button located in the toolbar.

Configuring the CentOS 6 Firewall to Allow SSH Connections

If you are using a firewall to protect your CentOS system you may need to allow SSH connections before you will be able to connect from a remote system. If you are using the basic firewall configuration (see Basic CentOS 6 Firewall Configuration) you can allow SSH connections using the Security Level and Firewall Configuration tool. This tool is launched from the System -> Administration -> Firewall menu option as appears as follows:
Configuring a CentOS 6 Firewall for SSH access
If the box next to SSH is not already checked, check it and click Apply to allow ssh traffic to pass through the firewall.

Using SSH on CentOS 6

SSH can be used to log into your system from a remote system. It is also possible to test that the SSH server is running and accessible from the local machine. SSH connections are established using the ssh client utility.

To connect from a local system back to itself use the following command:

ssh -l username ipaddress

Where username is the name of the user you wish to log in as and ipaddress is the IP address of your system. You can also substitute the hostname of the system in place of the IP address. If you do not know the IP address run the ifconfig command in a terminal window. This will output information similar to:

eth0      Link encap:Ethernet  HWaddr 00:13:72:0B:14:57
          inet addr:192.168.2.21  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::213:72ff:fe0b:1457/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4261067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4409081 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:2068332349 (1.9 GiB)  TX bytes:2408187471 (2.2 GiB)
          Base address:0xcce0 Memory:fe3e0000-fe400000

In the above output the IP address is shown as inet addr:, in this case 192.168.2.21.

To connect from a remote system, perform the same steps above using either the IP address or host name of the remote host to which you wish to connect. Enter your password when prompted and you will find yourself logged into the remote system.

Copying files using SSH

The SSH service provides a mechanism for securely copying files to and from a remote system. Copying is performed using the scp utility. To copy a file to a directory on a remote system, execute the following command:

scp myfile.txt username@192.168.2.21:/home/demo

Where myfile.txt is the name of the file to be uploaded to the remote system, username is the name of user account to be used to log into the remote system, 192.168.2.21 is replaced by the real IP address or hostname of the system and /home/demo represents the directory into which the file should be copied.

The above file could similarly be copied from the remote system to the local system as follows:

scp username@192.168.2.21:/home/demo/myfile.txt .

The above command will copy the remote file to the current directory on the local system.

Disabling the SSH Server

Having configured the system to run the SSH server we can now look at how to disable it. As we mentioned previously the SSH server runs in the background as a service. In order to disable SSH we need to turn off the SSH service. This can be achieved using the Services tool or from the command line. To disable the sshd service from the command line:

su -
/sbin/service sshd stop

To launch the services tool click on the desktop System menu and select Services from the Administration sub-menu. If the tool is not listed in the menu it will first need to be installed. This can be achieved from a terminal window as follows:

su –
yum install system-config-services

Once the tool is installed and launched, enter your password when prompted to do so. The Services tool will appear containing a list of all available services. Scroll down to find the sshd entry as shown below:
Disabling the SSH Server service on CentOS 6
Select the sshd entry and click on the Stop button. The SSH server is now stopped. If you wish to prevent the service from starting automatically next time the system starts, click on the Disable button.

source : http://www.techotopia.com/index.php/Configuring_CentOS_6_Remote_Access_using_SSH


Cara Format Harddrive/Flashdisk di Ubuntu

1.   Buka terminal

2.   setelah itu ketik  $sudo fdisk -l untuk melihat  letak flashdisk di device boot mana,
apakah di
/dev/sdb1 atau
/dev/sdc1 atau
di /dev/sdd1 atau yang lainnya.

3.  sebelum di format harus di unmount dulu dengan perintah berikut
$sudo umount “letak flsdisk”
contoh  :
$sudo umount /dev/sdb1

4.  terakhir ketik perintah format

$sudo mkfs.vfat /dev/sdb1


dhcp on centos

# yum -y install dhcp
# vi dhcpd.conf

Kemudian kita buat sebuah File Konfigurasi DHCP Server yang di letakkan pada folder : /etc/dhcp/ dengan nama file : dhcpd.conf

/etc/dhcp/dhcpd.conf

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.100.255;
option routers 192.168.100.5;
option domain-name-servers 192.168.100.5, 8.8.8.8, 8.8.4.4;

subnet 192.168.100.0 netmask 255.255.255.0 {
   range 192.168.100.100 192.168.100.200;
}

service dhcpd start

Cara Menghapus / Uninstall paket yang telah diinstall di ubuntu / Debian di teminal console

untuk menginstal aplikasi gunakan perintah :

apt-get install namapaket

untuk menghapus paket gunkan perintah :

apt-get remove nama paket

kalau tidak berhasil berikan ketikkan sudo di depannya

untuk menghapus semua denga konfugurasinya gunakan perintah :

apt-get purge namapaket/aplikasi

untuk menghapus file yang telah te extrak gunakan perintah :

rm -r nama aplikasi

untuk melihat paket/aplikasi yang telah terinstal gunakan perintah :

dpkg –list

atau dpkg –list | less

dpkg –list | grep -i ‘http’

sekian dulu pembahsan saya kali ini semoga bermanfaat buat kalian semua..


Cara instal Webmin di Debian / Ubuntu

Apa itu webmin ?

Webmin adalah interface berbasis web untuk administrasi sistem untuk Unix. Menggunakan browser web modern, kamu bisa mengatur user accounts, Apache, DNS, file sharing dan banyak lagi. Webmin menghilangkan kebutuhan untuk secara manual mengedit file konfigurasi Unix seperti / etc / passwd, dan memungkinkan kamu mengelola sistem dari console atau jarak jauh.

Langsung saja untuk tahap install-nya :

1. Download dolo paket webmin nya :

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.700_all.deb

2. Jalankan / run aplikasi di webmin-nya

dpkg --install webmin_1.700_all.deb

cacatan untuk no 2 : Jika Debian / Ubuntu gagal di jalankan dan mengeluh tentang dependensi yang hilang, kamu dapat menginstal mereka dengan perintah berikut ini :

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

nah bila semuanya sudah sukses di instal maka akan muncul webminnya

Selecting previously unselected package webmin.
(Reading database … 52690 files and directories currently installed.)
Unpacking webmin (from webmin_1.700_all.deb) …
Setting up webmin (1.700) …
Webmin install complete. You can now login to https://ip-kamu:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
Processing triggers for ureadahead …

nah sekarang saatnya kamu login ke webmin-nya di URL http://localhost:10000/ atau https://localhost:10000/

Ok, bila sudah bisa login ke webmin page-nya berarti kamu sudah sukses untuk menginstal webmin di debian / ubuntu.

sekian dolo dari saya, semoga tutorial tadi bermanfaat hehe..

Good Luck!! 🙂