Tampilkan postingan dengan label Squid. Tampilkan semua postingan
Tampilkan postingan dengan label Squid. Tampilkan semua postingan

Minggu, Januari 29, 2012

Squid Password with htpassword

Today a successful configure squid in Ubuntu Server 11:10 and actually, once the basic settings yet there is something special, just re-read guide that is in here and here .

The next step I tried was mempassword squidnya, so that when people access, despite connect wirelessly browsing when will be forced to login with the username and password that have been made using htpassword.

How to enable htpassword first is to install apache2, how to use apt-get it, and I use NCSA Authentication Helper. Follow the steps as follows:

1. Creating a directory to store the Username and Password htpasswordnya.

eg: # mkdir / usr / lib / squid / NCSA / / * is intended spy a directory with squidnya.

2. Run the command htpassword directly from the terminal, eg:

~ # Htpasswd-c / usr / lib / squid / NCSA / login.auth dobelden / / *-c option to create the user first, if you will add a user, the same command without the-c it.

The command above means that we make direktoru login.auth and user dobelden, when there will dienter enter the new password command, follow it.

3. Setting Edit / etc / squid / squid.conf in the following sections:

auth_param basic realm Squid-Proxy-Server
auth_param basic program / ​​usr / lib / squid / ncsa_auth / usr / lib / squid / NCSA / login.auth
auth_param basic children 5
2 hours auth_param basic credentialsttl
auth_param basic caseSensitive off
REQUIRED acl ncsa_users proxy_auth

4. On the local network http_access http_access below us, attach:

http_access allow ncsa_users

After that restart squidnya, and please be tested with external connection, or from our external network, by installing a manual on the internet browser options, when in Firefox in the Menu-Option-Option-Advanced-Network-Settings and enter our proxy server IP and test by browsing, viewing requests when existing Username and Password settings brarti we've succeeded.

Thus the way of preference, may be useful.

Kamis, Januari 14, 2010

Squid 3.0 On Debian Lenny

There is sample configuration for Squid 3.0

http_port 192.168.1.1:3128 transparent
icp_port 3130
acl youtube dstdomain .youtube.com
no_cache allow youtube
hierarchy_stoplist cgi-bin ? localhost .js .jsp .friendster.com
acl QUERY urlpath_regex cgi-bin \? localhost .friendster.com
no_cache deny QUERY
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_mem 6 MB
cache_dir diskd cache0 12000 28 256
cache_dir diskd cache1 12000 28 256
cache_swap_low 98
cache_swap_high 99
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
mime_table /usr/share/squid/mime.conf
pid_filename /var/run/squid.pid
client_netmask 255.255.255.0
refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
redirect_rewrites_host_header off
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localnet src 192.168.1.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 8443 563 777
acl Safe_ports port 25 80 81 110 443 563 6667 7000 777 210 119 70 21 1025-65535
acl Safe_ports port 280 6668 6669
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777

always_direct deny all
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny CONNECT
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
http_access deny all
maximum_object_size 128 MB
maximum_object_size_in_memory 8 KB
ipcache_size 4096
ipcache_low 98
ipcache_high 99
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 75
fqdncache_size 4096
shutdown_lifetime 10 seconds
cache_mgr squidku@yahoo.com
cache_effective_user proxy
cache_effective_group proxy
memory_pools off
buffered_logs off
log_icp_queries off
logfile_rotate 1
log_fqdn off
forwarded_for off
icp_hit_stale on
query_icmp on
reload_into_ims on
emulate_httpd_log off
negative_ttl 2 minutes
pipeline_prefetch on
vary_ignore_expire on
half_closed_clients off
high_page_fault_warning 2
nonhierarchical_direct on
prefer_direct off
visible_hostname squidku.net.id
unique_hostname squidku.net.id
For more configuration we can modificate the configuration above, beside implemented to Debian this configuration can apply to Ubuntu, Linuxmint and other linux distro.

For more information, just visit squid official site.