Forum

Bildirimler
Hepsini Temizle

squid 3

12 Yazılar
3 Üyeler
0 Likes
433 Görüntüleme
(@mehmetali)
Gönderiler: 140
Estimable Member
Konu başlatıcı
 

arkadaslar squid3 üzerinde https adreslerini engelleyip sadece istedigimiz https adreslerine girebilirmiyiz?

 
Gönderildi : 17/01/2013 00:38

(@bilgehanpoyraz)
Gönderiler: 809
Illustrious Member
 

Çok rahat yapabilirsiniz. aşağıda squid.conf bölümünü görebilirsiniz, Bold olarak yazan kısımları, eklerseniz bloklama yapabilirsiniz. bu alanda tam adresler yazabileceğiniz gibi sadece adresteki bir bölümüde yazarak bloklama yapabilirsiniz.

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl MyLocalUsers src 192.168.1.5-192.168.1.250/32
acl deny_sites dstdom_regex facebook.com xxx.com youtube

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access deny deny_sites
http_access allow MyLocalUsers

 
Gönderildi : 17/01/2013 13:14

(@mehmetali)
Gönderiler: 140
Estimable Member
Konu başlatıcı
 

hocam dedigini yaptım ama genede https den acıyor iptables ile bunu yapma olasılıgımız varmı .xxx.com adresini olmayan bi porta yonlendirmek gibi localden gelen bi adresi baska bi porta atmak olurmu acaba ?

 
Gönderildi : 30/01/2013 23:06

(@bilgehanpoyraz)
Gönderiler: 809
Illustrious Member
 

test ortamımda deneyip bilgi vereyim en kısa zamanda...

 
Gönderildi : 30/01/2013 23:38

(@bilgehanpoyraz)
Gönderiler: 809
Illustrious Member
 

protocol https olduğu için yasaklama yaptığımızda squid'in yasaklı sayfasını getiremiyorsunuz. Ama sayfa görüntülenemiyor şeklinde yasaklayabiliyorsunuz. yani https://www.facebook.com adresini denediğiniz zaman çok kısa sure içinde sayfa görüntülenemiyor şeklinde kullanıcının istediğiniz sitelere girmesini engelleyebiliyorsunuz. squid.conf'u aşağıdaki gibi düzenleyebilirsiniz. Eğer yasaklama sayfası gelsin istiyorsanız o zaman ip tables'e rule yazmanız lazım. o da aynı şekilde sayfayı blokluyor.

squid.conf aşağıdaki gibi,

---------------------------------------------------------------------------------------------------------------------

[root@localhost squid]# more squid.conf
# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl MyLocalUsers src 192.168.1.5-192.168.1.250/32
acl deny_sites url_regex -i facebook

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access deny deny_sites
http_access deny deny_sites CONNECT
http_access allow MyLocalUsers

# Deny requests to certain unsafe ports
http_access allow manager localhost

# Deny CONNECT to other than secure SSL ports
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

# And finally deny all other access to this proxy
http_access allow localnet
http_access allow localhost
http_access deny all

# Squid normally listens to port 3128
http_port 3128

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256
cache_dir aufs /var/spool/squid 1024 32 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320
maximum_object_size 64 MB
cache_effective_user squid
cache_effective_group squid
[root@localhost squid]#

--------------------------------------------------------------------------------------------------------------------------------------------------

 

Bilgehan

 
Gönderildi : 06/02/2013 02:18

(@Anonim)
Gönderiler: 0
 

http://www.squidguard.org/ kullan yada http://urlblacklist.com/ yada http://www.frws.com/squid_block/ Son ver link kullan tavsiye ederim şaayet nasıl yapıldığını çözemesen forumda yaz çok seneler önce yazmiş oldugum squid.conf ve mine.conf ları bulup yayınlıyayım

 
Gönderildi : 08/02/2013 07:40

(@mehmetali)
Gönderiler: 140
Estimable Member
Konu başlatıcı
 

cl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http

acl lan src 192.168.1.0/24
acl serbestdomain dstdomain "/etc/squid3/serbestdomainler"
acl serbestip src "/etc/squid3/serbestipler"
#acl deny_sites dstdom_regex facebook.com xxx.com youtube
acl deny_sites url_regex -i facebook

http_access deny deny_sites
http_access allow serbestip
http_access allow serbestdomain
http_access deny !serbestdomain
http_access allow lan

acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all

http_port 3128 transparent

cache_dir aufs /var/spool/squid3 1000 16 256

error_directory /usr/share/squid3/errors/Turkish
coredump_dir /var/spool/squid3

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .               0       20%     4320

bilgehan hocam benim squid dosyasıda boyle ama https sitesini acıyor dediginiz gibi bekleme yapıp sayfa goruntulenemiyor demiyor hata yaptıgım bisi yada atladıgım bisimi var?

 
Gönderildi : 20/02/2013 13:31

(@bilgehanpoyraz)
Gönderiler: 809
Illustrious Member
 

problem görünmüyor. Ben en son versiyonu kullanıyorum. Versiyon ile alakalı bir durum olabilir.

 
Gönderildi : 21/02/2013 01:11

(@bilgehanpoyraz)
Gönderiler: 809
Illustrious Member
 

Ban özelden ulaşın uzaktan bağlantı ile deneyelim yarın. 21.02.2013'te ...

 
Gönderildi : 21/02/2013 01:14

(@mehmetali)
Gönderiler: 140
Estimable Member
Konu başlatıcı
 

bilgehan hocam transparent moddan olabilirmi?

 
Gönderildi : 22/02/2013 13:38

(@bilgehanpoyraz)
Gönderiler: 809
Illustrious Member
 

transparent ile alakalı olmaması lazım. Transparent'i kaldırıp denedinizmi?

 

Bilgehan

 
Gönderildi : 22/02/2013 13:52

(@mehmetali)
Gönderiler: 140
Estimable Member
Konu başlatıcı
 

evet hocam dediginiz gibi transparenti kaldırdım dediginiz gibi calısıyor ama sıkıntı tum clientleri tek tek ayarlamak sorun baska bi yolu varmı acaba ?

 
Gönderildi : 23/02/2013 01:40

Paylaş: