PROXY
saya akan mengulas tentang konfigurasi proxy dengan mengeblok website dengan otomatis atou transparen disini saya menggunakan operating sistem linux ubuntu
disini saya menggunakan konfigurasi jaringan seperti di bawah ini

iface eth0 inet static
address 192.168.1.8
netmask 255.255.255.0
gateway 192.168.1.253
auto eth1
iface eth1 inet static
address 10.10.10.2
netmask 255.255.255.0
jangan lupa hubungkan eth0 dengan eth1
server# nano /etc/sysctl.conf
hapus tanda # pada
#net.ipv4.ip_forward=1
pastikan angka satu pada file proc
server# cat /proc/sys/net/ipv4/ip_forward
1
jika tidak satu maka ganti angka tersebut dengan angka 1
server# nano /proc/sys/net/ipv4/ip_forward
1
sering inetrnetserver#
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
jika sudah menyiapkan konfigurasi jaringan kemudian mari siapkan proxynya atou squi
server# apt-get install squid
server# nano /etc/squid/squid.conf
kemudian tambah script seperti di bawah ini
ketik printah ctrl w :insert
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
acl aaa src 10.10.10.0/255.255.255.0
http_access allow aaa
ketik printah crtl w :acl connect
acl CONNECT method CONNECT
acl blok dstdomain "/etc/blok"
http_access deny blok
ketik printah ctrl w : visible_hostname
# TAG: visible_hostname
# If you want to present a special hostname in error messages, etc,
# define this. Otherwise, the return value of gethostname()
# will be used. If you have multiple caches in a cluster and
# get errors about IP-forwarding you must set them to have individual
# names with this setting.
#
#Default:
# none (none di ganti dengan visible_hostname www.aaa.com dan jangan lupa hapus tanda #)
ketik printah crtl w : cache_mgr
# TAG: cache_mgr
# Email-address of local cache manager who will receive
# mail if the cache dies. The default is "webmaster".
#
#Default:
# cache_mgr webmaster (webmaster ganti nama admin "www.aaa.com" dan jangan lupa hapus tanda #)
ctrl f : port 3128
tambah script transparent setelah http_port 3128 seperti di bawah ini
# Squid normally listens to port 3128
http_port 3128 transparent
kemudian seve ketik perintah ctrt x
setelah itu buat file blok yang berisi daftar website yang akan d block,,,,
server# nano /etc/blok
tambahkan script daftar website yang akan d block
.facebook.com
.tube8.com
dan kemudian ketik perintah iptables di bawah ini
serve# iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to 10.10.10.2:3128
server# iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
sekian dari saya semoga bermanfaat terimakasih......................semoga berhsil.......
Nenhum comentário:
Postar um comentário