TANYA cara BLOK https://www.facebook.com di squid ?

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
suryayusra
Posts: 394
Joined: 05 May 2010, 15:54
Location: Palembang, Indonesia
Contact:

TANYA cara BLOK https://www.facebook.com di squid ?

Postby suryayusra » 26 May 2011, 15:53

selamat sore kawan ubuntu indonesia

saya mau tanya, gimana cara ngeblok https://www.facebook.com ?
https lohhh bukan http :D

saya menggunakan transparan proxy, setiap klient yang menuju port 80 akan di redirect ke port 8080 proxy.

tapi yang jadi msalah jika port https 443 menuju facebook gimana cara ngebloknya ?

contoh http://www.facebook.com <<< ini bisa saya blok
tapi jika https://www.facebook.com gimana ???

mohon bantuannya.
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby yudiarbi » 26 May 2011, 23:31

bikin aj acl, terus mainin http_acces aq rasa ud cukup :D
User avatar
djoenk
Posts: 17
Joined: 22 May 2011, 01:18
Location: Kebon Jeruk, Jakarta
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby djoenk » 27 May 2011, 14:18

ikutan mantau gan'...
ane jg msh lom nemu ramuan'nya :D
--------------------------------
sekedar share
ane da cb buat

pertama :
---------
acl bad_sites url_regex -i "/squid/etc/bad_url"
http_access deny bad_sites

isi dari "bad_url"
[^].facebook.com

kedua :
--------
acl fbnakal url_regex -i ^https:\/\/[a-z]\.facebook\.com
deny_info http://www.google.com/ fbnakal
http_access deny fbnakal

ketiga : (maen di iptables)
---------
## bikin sub-chain blocking FB
iptables -N NOFB
iptables -A NOFB -d http://www.facebook.com -p tcp -m tcp --dport 443 -j DROP
iptables -A NOFB -d facebook.com -p tcp -m tcp --dport 443 -j DROP
iptables -A NOFB -j RETURN

## pasang sub-chain ke chain OUTPUT dan FORWARD
iptables -I FORWARD -j NOFB
iptables -I OUTPUT -j NOFB

-----------------------------------------------------------------
dari hasil uji coba,ubur cumi msh gak mau nyekek si https "FACEBOOK", adakah yg sudi tuk membagi tips & trik nya gan..???
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby yudiarbi » 27 May 2011, 17:57

mencoba bantu ya : pada squid.conf

Code: Select all

acl porn url_regex "/etc/squid/block.txt"
http_access deny porn

perintah iptables

Code: Select all

iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables -A INPUT -p tcp --dport 443 -j DROP

isi block.txt :
https://facebook.com
User avatar
djoenk
Posts: 17
Joined: 22 May 2011, 01:18
Location: Kebon Jeruk, Jakarta
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby djoenk » 28 May 2011, 18:54

msh lom bs gan,gmn ya...
apa da yg slh dgn squid.conf ane?

---------------------------------------------------
# ACL HTTPS FACEBOOK
acl dilarang url_regex "/etc/squid/situs.txt"
http_access deny dilarang

# Setup some default acls
acl all src 0.0.0.0/0
acl localhost src 127.0.0.1/32
acl safeports port 21 70 80 81 210 280 443 488 563 591 631 777 901 3128 1025-65$
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl dynamic urlpath_regex cgi-bin \?
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports

--------------------------------------------
# Generated by iptables-save v1.4.4 on Sat May 28 18:58:01 2011
*nat
:PREROUTING ACCEPT [9:864]
:POSTROUTING ACCEPT [5:301]
:OUTPUT ACCEPT [5:301]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
COMMIT
# Completed on Sat May 28 18:58:01 2011
# Generated by iptables-save v1.4.4 on Sat May 28 18:58:01 2011
*filter
:INPUT ACCEPT [1930:665905]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1987:681364]
-A INPUT -p tcp -m tcp --dport 443 -j DROP
COMMIT
# Completed on Sat May 28 18:58:01 2011
User avatar
sipelaut
Posts: 1963
Joined: 03 Jan 2010, 17:25
Location: madura-sampang
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby sipelaut » 29 May 2011, 14:25

hmm...............
munkin link ini bisa ngebantu [0]
soalnya masalahku hampir mirip meskipun tidak 100% sama
dan punyaku berjalan lancar sampek sekarang.
mesipun masih ada kekurangannya tapi lumayanlah
untuk keperluan lainnya bisa ditambahin sendiri
[0] http://ubuntu-indonesia.com/forums/ubbt ... cs/44618/1
User avatar
rizaaal
Posts: 1212
Joined: 01 May 2011, 16:02
Location: Bekasi, Indonesia
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby rizaaal » 06 Mar 2012, 13:22

saya ngalamin masalah yang sama nih, gimana ya caranya? apakah squid emang ga bisa sama sekali ngeblok https?

saya udah coba pake cara iptables dan berhasil. tapi kan iptables itu gabisa di setting sesuai jadwal kayak acl time di squid. mohon pencerahannya. :)
User avatar
ilham2930
Posts: 1123
Joined: 02 Jan 2010, 19:30
Location: /indonesia/tangerang/bonank_city
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby ilham2930 » 06 Mar 2012, 13:46

djoenk wrote:msh lom bs gan,gmn ya...
apa da yg slh dgn squid.conf ane?

---------------------------------------------------
# ACL HTTPS FACEBOOK
acl dilarang url_regex "/etc/squid/situs.txt"
http_access deny dilarang

# Setup some default acls
acl all src 0.0.0.0/0
acl localhost src 127.0.0.1/32
acl safeports port 21 70 80 81 210 280 443 488 563 591 631 777 901 3128 1025-65$
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl dynamic urlpath_regex cgi-bin \?
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports

--------------------------------------------
# Generated by iptables-save v1.4.4 on Sat May 28 18:58:01 2011
*nat
:PREROUTING ACCEPT [9:864]
:POSTROUTING ACCEPT [5:301]
:OUTPUT ACCEPT [5:301]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
COMMIT
# Completed on Sat May 28 18:58:01 2011
# Generated by iptables-save v1.4.4 on Sat May 28 18:58:01 2011
*filter
:INPUT ACCEPT [1930:665905]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1987:681364]
-A INPUT -p tcp -m tcp --dport 443 -j DROP
COMMIT
# Completed on Sat May 28 18:58:01 2011


jaringan client belum di definisikan...
misal;
acl LAN src 192.168.1.0/24

baru di masukan rule "dilarang" dibawah !sslport

http_access deny dilarang
http_access allow LAN
http_access deny all

## untuk block yg https, coba perhatikan rule
http_access deny CONNECT !sslports

coba dimainkan secara logika..dan untuk refresh aja, rule squid membaca dari atas ke bawah, jadi urutan sangat berpengaruh
User avatar
rizaaal
Posts: 1212
Joined: 01 May 2011, 16:02
Location: Bekasi, Indonesia
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby rizaaal » 07 Mar 2012, 12:10

ilham2930 wrote:
djoenk wrote:msh lom bs gan,gmn ya...
apa da yg slh dgn squid.conf ane?

---------------------------------------------------
# ACL HTTPS FACEBOOK
acl dilarang url_regex "/etc/squid/situs.txt"
http_access deny dilarang

# Setup some default acls
acl all src 0.0.0.0/0
acl localhost src 127.0.0.1/32
acl safeports port 21 70 80 81 210 280 443 488 563 591 631 777 901 3128 1025-65$
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl dynamic urlpath_regex cgi-bin \?
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports

--------------------------------------------
# Generated by iptables-save v1.4.4 on Sat May 28 18:58:01 2011
*nat
:PREROUTING ACCEPT [9:864]
:POSTROUTING ACCEPT [5:301]
:OUTPUT ACCEPT [5:301]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
COMMIT
# Completed on Sat May 28 18:58:01 2011
# Generated by iptables-save v1.4.4 on Sat May 28 18:58:01 2011
*filter
:INPUT ACCEPT [1930:665905]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1987:681364]
-A INPUT -p tcp -m tcp --dport 443 -j DROP
COMMIT
# Completed on Sat May 28 18:58:01 2011


jaringan client belum di definisikan...
misal;
acl LAN src 192.168.1.0/24

baru di masukan rule "dilarang" dibawah !sslport

http_access deny dilarang
http_access allow LAN
http_access deny all

## untuk block yg https, coba perhatikan rule
http_access deny CONNECT !sslports

coba dimainkan secara logika..dan untuk refresh aja, rule squid membaca dari atas ke bawah, jadi urutan sangat berpengaruh


mas ilham bisa mas ngeblok https? saya butuh banget nih..
User avatar
ilham2930
Posts: 1123
Joined: 02 Jan 2010, 19:30
Location: /indonesia/tangerang/bonank_city
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby ilham2930 » 07 Mar 2012, 15:15

udah coba didampingin squidGuard zal..?
User avatar
rizaaal
Posts: 1212
Joined: 01 May 2011, 16:02
Location: Bekasi, Indonesia
Contact:

Re: TANYA cara BLOK https://www.facebook.com di squid ?

Postby rizaaal » 11 Mar 2012, 19:20

ilham2930 wrote:udah coba didampingin squidGuard zal..?


belum pernah mas. tapi itu udah pasti bisa mas? kalo bisa saya bakalan cari ntar :D

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 3 guests