Posts tagged proxy

Membuat forward/reverse proxy di apache

jika diketahui…

server yang dapat diakses dari jaringan luar adalah 192.168.1.1 1. web server yang akan digunakan adalah 192.168.1.11 2. server 192.168.1.1 dan 192.168.1.11 terinstall Linux dan Apache2

Ditanya:

saya pingin membuat webserver di server saya, server saya adalah 192.168.1.1. tetapi saya ingin agar ketika user/client mengakses http://192.168.1.1 maka yang sebenernya di akses adalah http://192.168.1.11, bagaimana caranya?

Jawab:

0. install apache2 dan aktifkan modul proxy, proxy_connect, proxy_http dan rewrite (opsional) di kedua ip itu

  • # aptitude install apache2
    # a2enmod proxy
    # a2enmod proxy_connect
    # a2enmod proxy_http
    # a2enmod rewrite
    # /etc/init.d/apache2 restart

1. sunting berkas /etc/apache2/sites-available/default di sisi server, dan tambahkan baris berikut.

  • server:~# pico /etc/apache2/sites-available/default
    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *> Order deny,allow
    Allow from all
    </Proxy>
    ProxyPass / http://192.168.1.11/
    <Location /> ProxyPassReverse /
    SetOutputFilter  proxy-html
    </Location>

2. sunting berkas /etc/apache2/sites-available/default di sisi webserver 192.168.1.11, dan tambahkan baris berikut: (opsional, boleh di laksanakan boleh tidak. walau tidak diberi tetep berjalan)

  • web01:~# pico /etc/apache2/sites-available/default
    ProxyRequests On
    ProxyVia On
    <Proxy *>
    Order deny,allow
    Deny from all
    Allow from 192.168.1.1
    </Proxy>

3. restart daemon apache di kedua sisi ip

  • # /etc/init.d/apache2 restart

4. cek dengan web browser dengan alamat http://192.168.1.1 maka yang akan nampak sebenere adalah http://192.168.1.11

5. ucapkan alhamdulillah…… gampang to?

Trying anonymouse proxy

Following great post from Harry Sufehmi, you can improved your connction up to 10x. Yup 10x. Just typing at terminal:

$ ssh -o “CompressionLevel=9? -C -D 9999 -p 222 -N net@cepat.abangadek.com

when ask password just typing cepat123, if your terminal doesn’t appear anything it mean yau sucsess connected to proxy. example:

$ ssh -o "CompressionLevel=9" -C -D 9999 -p 222 -N net@cepat.abangadek.com
Password:

finally set your firefox and GNOME proxy like this:

gambar-layar-pengaturan-sambungan

gambar-layar-pengaturan-proksi-jaringan

and the result is….

proxy

Cool! with no HTTP_Client_Ip and HTTP_Proxy

wget di bawah proxy

Saya sering lupa yang ini, yaitu lupa setting wget saat di kampus. karena kampus saya menggunkan proxy mana saya sering lupa tuk setting wget…. caranya buka file /etc/wgetrc temukan kata-kata yang berbau proxy…. seperti ini

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://10.10.1.3:3128/
ftp_proxy = http://10.10.1.3:3128/

# If you do not want to use proxy at all, set this to off.
use_proxy = on

karena saya suka menggunakan mc dan pico perintah pengeditanya seperti ini

$ pico /etc/wgetrc

kalo sudah simpan dan siap di uji coba boz…..

referensi:

http://milisdad.blogspot.com/2007_09_01_archive.html