BUMI ARUNG PALAKKA
Selamat datang di forum kami jayalah anak bone di dunia TI
BUMI ARUNG PALAKKA
Selamat datang di forum kami jayalah anak bone di dunia TI
BUMI ARUNG PALAKKA
Would you like to react to this message? Create an account in a few clicks or log in to continue.

BUMI ARUNG PALAKKA


 
IndeksGalleryLatest imagesPendaftaranLogin
...JIKA KAMU MENGAKU anak BONE PEDULI DENGAN DUNIA IT GABUNG DIFORUM INI...
Google

 

 Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid

Go down 
2 posters
PengirimMessage
dippounix

Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid  1-star10



Male
Capricorn Tiger
Jumlah posting : 5
Age : 37
Alamat : JL. Sunter Agung Utara Barat
Kota : Jakarta Utara
Provinsi : DKI JAKARTA
Outlet : Virtual Outlet
Toko : Virtual Outlet Street
Poin : 11
Reputation : 0
Registration date : 01.07.10

Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid  Empty
PostSubyek: Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid    Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid  I_icon_minitimeThu 1 Jul 2010 - 17:51

Dalam hal ini tersedia :

  1. Server Linux Centos dengan 2 NIC
    - eth0 : 192.168.200.200 terhubung ke internet melalui proxy (gateway 192.168.200.1)




    - eth1 : 192.168.210.1 terhubung dengan client di ruangan
  2. Proxy server menggunakan Squid
    - setup awal squid dengan –> http://kusprayitna.staff.uii.ac.id/2008/08/29/setup-proxy-squid-di-centos/

Tujuan :

  1. Komputer di dalam ruangan bisa melakukan koneksi ke jaringan luar
    akan tetapi komputer di jaringan luar tidak bisa masuk ke komputer yang
    ada di ruanga

Tahapan yang dilakukan yaitu :

  1. Membuat Centos agar menjadi routerDisini disiapkan router ang
    bersifat Masquerading, maksudnya yaitu, semua komputer yang ada di
    ruangan (yang terhubung melalui gateway eth1) akan bisa melakukan
    koneksi ke luar melalui eth0 dan mengatas namakan eth0. Misalnya
    komputer di ruangan IPnya adalah 192.168.210.12 melakukan browsing ke
    server 192.168.220.5 (komputer di LAN lain yang bisa diakses melalui
    eth0), maka komputer server 192.168.220.5 akan membaca yang akses ke
    servernya adalah 192.168.200.200 bukannya 192.168.210.12. Atau dengan
    kata lain masquerading bermaksud membungkus alamat IP asli menjadi
    alamat IP yang Masquerading.Scrip yang disiapkan yaitu

    # Hapus semua seting yang sudah ada.
    iptables –flush
    iptables –table nat –flush
    iptables –delete-chain
    iptables –table nat –delete-chain
    # Set up IP FORWARDing and Masquerading
    iptables –table nat –append POSTROUTING –out-interface eth0 -j MASQUERADE
    iptables –append FORWARD –in-interface eth1 -j ACCEPT
    # Aktifkan packet forwarding di kernel
    echo 1 > /proc/sys/net/ipv4/ip_forward
    # routing
    route add -net 192.168210.0 netmask 255.255.255.0 gw 192.168.200.1 dev eth1
  2. Setup squid agar support transparent proxyYang dimaksud transparent
    proxy yaitu secara mudahnya adalah agar browsing di browser tidak usah
    melakukan seting proxy (tanpa proxy atau default port 80).Di Squid bisa
    dicek di data berikut :

    # TAG: http_port
    # Usage: port [options]
    # hostname:port [options]
    # 1.2.3.4:port [options]
    #
    # The socket addresses where Squid will listen for HTTP client
    # requests. You may specify multiple socket addresses.
    # There are three forms: port alone, hostname with port, and
    # IP address with port. If you specify a hostname or IP
    # address, Squid binds the socket to that specific
    # address. This replaces the old ‘tcp_incoming_address’
    # option. Most likely, you do not need to bind to a specific
    # address, so you can use the port number alone.
    #
    # The default port number is 3128.
    #
    # If you are running Squid in accelerator mode, you
    # probably want to listen on port 80 also, or instead.
    #
    # The -a command line option will override the *first* port
    # number listed here. That option will NOT override an IP
    # address, however.
    #
    # You may specify multiple socket addresses on multiple lines.
    #
    # options are:
    # transparent Support for transparent proxies
    # vhost Accelerator using Host directive
    # vport Accelerator with IP virtual host support
    # vport= As above, but uses specified port number
    # rather than the http_port number.
    # defaultsite= Main web site name for accelerators.
    # urlgroup= Default urlgroup to mark requests
    # with (see also acl urlgroup and
    # url_rewrite_program)
    # protocol= Protocol to reconstruct accelerated
    # requests with. Defaults to http.
    # no-connection-auth
    # Prevent forwarding of Microsoft
    # connection oriented authentication
    # (NTLM, Negotiate and Kerberos)
    # tproxy Support Linux TPROXY for spoofing
    # outgoing connections using the client
    # IP address.
    #
    # If you run Squid on a dual-homed machine with an internal
    # and an external interface we recommend you to specify the
    # internal address:port in http_port. This way Squid will only be
    # visible on the internal address.
    #
    # Squid normally listens to port 3128
    http_port 3128 transparent
    Disini kita set proxy aktif di port 3128 dan transparent.
    Langkah yang disiapkan yaitu :
    1. Lakukan redirect akses yang bertujuan di port 80 ke port 3128 (port proxy)

    iptables –table nat –append PREROUTING -i eth1 -p tcp –dport 80 -j REDIRECT –to-port 3128
    printah ini bermaksud melakukan aturan dalam iptable agar paket tcp
    yang tujuannya port 80 diarahkan ke port 3128 (proxy server). Perintah
    ini bisa di tambahkan dalam scrip di pembuatan gateway diatas.
    2. Uji coba proxy
    2.1. Ujicoba dengan browser

    Dari browser di komputer client dengan isian proxy di kosongkan (tanpa proxy) lakukan browsing ke www.uii.ac.id
    2.2. Apabila gagal, coba lakukan pengujian dengan telnet, “telnet 192.168.210.1 80?

    telnet 192.168.210.1 80
    Trying 192.168.210.1…
    Connected to 192.168.210.1.
    Escape character is ‘^]’.
    kemudian tuliskan alamat website yang akan dibuka, misalnya www.uii.ac.id
    get http://www.uii.ac.id

    maka berikutnya akan muncul isi text dari www.uii.ac.id
    2.3. Apabila 2.2 berhasil membuka alamat website dengan port 80 akan tetapi 2.1 gagal, maka perlu diperhatikan sebagai berikut :
    - Alamat gateway komputer client harus ke 192.168.210.1
    - Alamat DNS server harus betul dan bisa berfungsi, apabila kosong/ tidak berfungsi maka tidak akan bisa browsing

    Sumber http://dippo-unix.co.cc/id/index.php?option=com_content&view=article&id=193:membuat-server-centos-menjadi-gateway-dan-transparent-proxy-dengan-squid&catid=31:linux-administration&Itemid=46
Kembali Ke Atas Go down
http://dippo-unix.co.cc
agakoi
OWNER
OWNER
agakoi


Male
Pisces Horse
Jumlah posting : 586
Age : 94
Alamat : Jl.Sukawati
Kota : watampone
Provinsi : Sulawesi Selatan
Outlet : Murah Jaya Cell
Toko : AgakoI KOMPUTER
Poin : 10425
Reputation : 1014
Registration date : 24.12.08

Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid  Empty
PostSubyek: Re: Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid    Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid  I_icon_minitimeTue 20 Jul 2010 - 0:52

mantap nih boss sharingnya
salam kenal dari saya............ Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid  336186
Kembali Ke Atas Go down
http://www.forum-bonecommunity.com
 
Membuat Server Centos Menjadi Gateway dan Transparent Proxy dengan Squid
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» Mengubah Taskbar Windows XP menjadi Seperti Windows 7
» 10 Cara Menjadi Ayah Yang Hebat
» Menangis Membuat Tubuh Lebih Santai
» Membuat Sendiri Favicon Blog Anda
» 10 Tips Membuat Facebook Makin Asyik

Permissions in this forum:Anda tidak dapat menjawab topik
BUMI ARUNG PALAKKA :: Seputar Komputer,laptop Dan Games :: Komputer :: Operasi sistem-
Navigasi: