Cara Mengganti DNS Di Ubuntu

Embed Size (px)

Citation preview

Cara Mengganti DNS di Ubuntu

1. pertama buka Terminal :

Applications>Accessories>Terminal

2. Login sebagai root (sudo su)

3. ketikan perintah :

sudo gedit /etc/resolv.conf

4. Kemudian ubah DNS tersebut menjadi DNS yang akan kita ubah.

5. Save dan closeCara Merestart dan Men-Shutdown Ubuntu Melalui Terminal1. pertama buka Terminal :

Applications>Accessories>Terminal

2. Login sebagai root (sudo su)

3. untuk merestart ketikan perintah :

reboot

4. Kemudian untuk menshutdown ketikan perintah :

sudo halt

Cara Melihat IP Address dan DNS di Ubuntu 1. pertama buka Terminal :

Applications>Accessories>Terminal

2. ketikan perintah :

ifconfig

Cara Melihat Partisi Hardisk Melalui Terminal 1. pertama buka Terminal :

Applications>Accessories>Terminal

2. Login sebagai root (sudo su)

3. ketikan perintah :

fdisk -l

Membersihkan Cache dan Junk di Ubuntu 10.10 Menggunakan Ubuntu Tweak 1. Buka Ubuntu Tweak :

Application>System Tools>Ubuntu Tweak

2. Pilih Package Cleaner

3. Kemudian pilih Unlock

4. Setelah itu pilih Clean Cache>Cleanup

5. Lalu pilih Clean Config>Cleanup

6. Jika sudah pilih QuitCara Melihat Versi Kernel Ubuntu yang kita Gunakan 1. pertama buka Terminal :

Applications>Accessories>Terminal

2. Login sebagai root (sudo su)

3. ketikan perintah :

uname -r

Perintah Dasar Linux Ubuntu Server. Berikut beberapa Perintah Dasar Linux Ubuntu Server, diantaranya :1. who = Melihat user yang login dan pada terminal mana user login.2. whoami = Melihat user yang aktif3. who am i = Melihat user yang aktif pada terminal yang aktif4. uname -r = Melihat kernel yang digunakan pada OS5. ls = Melihat directory yang terdapat pada harddisk beserta file yang ada didalam harddisk6. mkdir = Membuat folder / direktory7. touch = Membuat file8. echo = Membuat teks pada terminal9. cat = Melihat hasil teks editor dari sebuah file10. tac = Mengembalikan urutan dari teks sebuah file.11. rm = Menghapus file12. rm -rf = Menghapus Direktory beserta isinya13. rmdir = Mengapus directory yang kosong14. sudo su = User akan menggati root / super admin15. adduser = Menambahkan user baru16. su = Memasuki nama user, jika sebelumnya adalah root17. passwd = Mengubah password dari user18. addgroup [nama group] = membuat sebuah group19. addgroup [nama user] [nama group] = memasukan nama user ke dalam group20. deluser [nama user] = menghapus user dari sistem21. deluser --remove-home [nama user] = menghapus nama user beserta direktory itu22. delgroup [nama group] = menghapus group23. ifconfig = mengetahui kartu jaringan dan konfigurasi dari kartu jaringan di dalam computer

Cara Install Squid Proxy Server di Ubuntu Server 10.10 dan 10.04 Berikut konfigurasi partisi harddisk di ubuntu server dengan ukuran HDD 80GB:/boot -----> 1Gb ext4 Boot Flag on/ ------> 3Gb ext4/usr -----> 5Gb ext4/var -----> 5Gb ext4swap -----> 2Gb (2 x RAM di PC)/cache -----> 50Gb ReiserFS (intel) atau BTRFS (AMD)/home ------> sisanya jika adaLangkah-langkahnya:

1. Login ubuntu dengan putty2. Jika belum membuat user root, ketik sudo su, masukkan password ubuntu kamu, kemudian ketik passwd dan isikan password baru untuk root.3. Silahkan copy paste syntax di bawah melalui putty:sudo apt-get updatesudo apt-get install squidsudo apt-get install squid squidclient squid-cgisudo apt-get install ccze4. Stop squid-nya dengan perintah:"squid stop" atau "/etc/init.d/squid stop" atau "service squid stop" jika tidak mau restart dulu PC-nya.5. Edit squid.conf memakai winscp atau dengan perintah:nano /etc/squid/squid.confKemudian copy paste isi squid.conf di bawah ini (sebelumnya backup dulu squid.conf yang asli):# Porthttp_port 3128 transparenticp_port 3130prefer_direct off

server_http11 on

# Cache

cache_mem 8 MBcache_swap_low 98cache_swap_high 99max_filedesc 8192maximum_object_size 128 MBminimum_object_size 0 KBmaximum_object_size_in_memory 128 KB

ipcache_size 10240ipcache_low 98ipcache_high 99fqdncache_size 4096cache_replacement_policy heap LFUDAmemory_replacement_policy heap GDSF

cache_dir aufs /cache 30000 16 256 # untuk partisi /cache 50GB

cache_access_log /var/log/squid/access.logcache_log /var/log/squid/cache.logcache_store_log nonepid_filename /var/run/squid.pidcache_swap_log /var/log/squid/swap.statedns_nameservers /etc/resolv.confemulate_httpd_log offhosts_file /etc/hostshalf_closed_clients offnegative_ttl 1 minutes

acl all src 0.0.0.0/0.0.0.0acl manager proto cache_objectacl localhost src 127.0.0.1/255.255.255.255acl to_localhost dst 127.0.0.0/8acl SSL_ports port 443 563 873 # https snews rsyncacl Safe_ports port 80 # httpacl Safe_ports port 20 21 # ftpacl Safe_ports port 70 # gopheracl Safe_ports port 210 # waisacl Safe_ports port 1025-65535 # unregistered portsacl Safe_ports port 631 # cupsacl Safe_ports port 10000 # webminacl Safe_ports port 901 # SWATacl Safe_ports port 280 # http-mgmtacl Safe_ports port 488 # gss-httpacl Safe_ports port 591 # filemakeracl Safe_ports port 777 # multiling httpacl Safe_ports port 873 # rsyncacl Safe_ports port 110 # POP3acl Safe_ports port 25 # SMTPacl Safe_ports port 2095 2096 # webmail from cpanelacl Safe_ports port 2082 2083 # cpanel

acl purge method PURGEacl CONNECT method CONNECThttp_access allow manager localhosthttp_access deny managerhttp_access allow purge localhosthttp_access deny purgehttp_access deny !Safe_ports !SSL_portshttp_access deny CONNECT !SSL_ports !Safe_ports

# pictures & imagesrefresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-privaterefresh_pattern -i \.(xml|html|htm|js|txt|css|php)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth

#sound & video refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg|swf)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cacherefresh_pattern -i \.(wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private

# filesrefresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-authrefresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-authrefresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-authrefresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire ignore-no-cache ignore-authrefresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth

# -- refresh pattern for specific sites -- #refresh_pattern ^http://*.jobstreet.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cacherefresh_pattern ^http://*.indowebster.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-authrefresh_pattern ^http://*.21cineplex.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-authrefresh_pattern ^http://*.atmajaya.*/.* 720 100% 10080 override-expire ignore-no-cache ignore-authrefresh_pattern ^http://*.kompas.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.theinquirer.*/.* 720 100% 10080 override-expire ignore-no-cache ignore-authrefresh_pattern ^http://*.blogspot.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cacherefresh_pattern ^http://*.photobucket.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.tinypic.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.imageshack.us/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.kaskus.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://www.kaskus.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.detik.*/.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://video.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://static.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.friendster.com/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache ignore-authrefresh_pattern ^http://*.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://apps.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://profile.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://static.playspoon.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://cooking.game.playspoon.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern -i http://[^a-z\.]*onemanga\.com/? 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://media?.onemanga.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.yahoo.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.google.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.forummikrotik.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-authrefresh_pattern ^http://*.linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth

#default optionrefresh_pattern ^ftp: 1440 20% 10080refresh_pattern ^gopher: 1440 0% 1440refresh_pattern -i (/cgi-bin/|\?) 0 0% 0refresh_pattern . 0 20% 4320

# ALLOWED ACCESSacl localnet src 192.168.1.0/24 #IP lokal kamu http_access allow localnethttp_access allow localhosthttp_access deny allhttp_reply_access allow allicp_access allow localneticp_access allow localhosticp_access deny allalways_direct deny all

cache_mgr [email protected]_hostname inilah-proxy-kucache_effective_user proxycache_effective_group proxycoredump_dir /var/spool/squidshutdown_lifetime 10 secondslogfile_rotate 14

#-----------------------------------------------------------------##tcp_outgoing_tos 0x30 localnet#-----------------------------------------------------------------#

zph_mode toszph_local 0x30zph_parent 0zph_option 136Kode di atas lebih baik copy dulu ke notepad++ agar rapi6. Stop lagi squid-nya dengan perintah:"squid stop" atau "/etc/init.d/squid stop" atau "service squid stop" jika tidak mau restart dulu PC-nya.7. Memberikan permission, ketik pada putty:chown -R proxy.proxy /cachechown proxy.proxy /var/log/squid/access.log 8. Membuat swap, ketik pada putty:squid -f /etc/squid/squid.conf -zatausquid -z9. Restart squid-nya:"squid restart" atau "service squid restart" atau "/etc/init.d/squid restart", jika tidak bisa restart PC-nya.10. Buka www.whatismyip.com, jika berhasil akan tertera keterangan IP public dengan proxy detected squid 2.7 stable.Semoga berhasil dan selamat mencoba