프로그램 사용/squid2019. 2. 12. 10:42

일단.. 아래와 같이 squid.conf에서 하나를 막아주면, 다른데서도 접속이 가능한데

# Only allow cachemgr access from localhost

http_access allow localhost manager

#http_access deny manager 


proxy ip로 접근하니 안되고 아래 링크를 추천(?) 해줘서 가니 되긴 한다.

http://localhost.localdomain:3128/squid-internal-mgr/info 


[링크 : https://wiki.squid-cache.org/Features/CacheManager]

[링크 : https://wiki.squid-cache.org/ManagerCgiTool]

[링크 : https://wiki.squid-cache.org/SquidClientTool]

[링크 : https://www.pks.mpg.de/~.../suse10.2/html/opensuse-manual_en/manual/sec.squid.cachemgr.html]

'프로그램 사용 > squid' 카테고리의 다른 글

squid log format  (0) 2019.02.13
squid refresh_pattern  (0) 2019.02.12
howto make squid as https proxy  (0) 2019.02.11
ssl_crtd : The ssl_crtd helpers are crashing too rapidly, need help!  (0) 2019.02.11
haproxy - https proxy  (0) 2019.02.11
Posted by 구차니
프로그램 사용/squid2019. 2. 11. 15:48

상태 : https proxy는 되나 , cache 까지 되는건 확인하지 못함(HIT가 드럽게 안뜸!!!)



Step 1. squid, openssl, bind 패키지를 설치

# yum install bind squid openssl 


Step 2. SSL 키를 생성(서버용, 클라이언트 용) - 1년짜리로 생성

# mkdir /etc/squid/ssl_cert

# chown -R squid.squid /etc/squid/ssl_cert

# cd /etc/squid/ssl_cert

# openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -extensions v3_ca -keyout proxyCA.pem  -out proxyCA.pem

# openssl x509 -in proxyCA.pem -outform DER -out proxyCA.der  


Step 3. SSL_DB를 생성

# /usr/lib64/squid/ssl_crtd -c -s /var/lib/ssl_db

# chown -R squid.squid /var/lib/ssl_db


Step 4. bind 설정

# vim /etc/named.conf

//

// named.conf

//

// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS

// server as a caching only nameserver (as a localhost DNS resolver only).

//

// See /usr/share/doc/bind*/sample/ for example named configuration files.

//


acl mynet {

    192.168.201.0/24; # test network

    127.0.0.1; # localhost

    };


options {

    listen-on { 

        mynet;

        };

    listen-on-v6 port 53 { ::1; };

    directory     "/var/named";

    dump-file     "/var/named/data/cache_dump.db";

        statistics-file "/var/named/data/named_stats.txt";

        memstatistics-file "/var/named/data/named_mem_stats.txt";

    allow-query     { mynet; };

    recursion yes;

    

    forward only;

    forwarders {

        8.8.8.8;

        };


    dnssec-enable yes;

    dnssec-validation yes;

    dnssec-lookaside auto;


    /* Path to ISC DLV key */

    bindkeys-file "/etc/named.iscdlv.key";


    managed-keys-directory "/var/named/dynamic";

};


logging {

        channel default_debug {

                file "data/named.run";

                severity dynamic;

        };

};


zone "." IN {

    type hint;

    file "named.ca";

};


include "/etc/named.rfc1912.zones";

include "/etc/named.root.key";


#############################################

#    home.lan

#############################################


zone "home.lan" IN {

    type master;

    file "/var/named/home.lan/db.home";

    allow-query {

    mynet;

    };

    };


# mkdir /var/named/home.lan

# touch /var/named/home.lan/db.home

# chown -R named.named /var/named/home.lan


# vi /var/named/home.lan/db.home

$ORIGIN home.lan.

$TTL 86400

@    IN    SOA    proxy.home.lan.    proxy.home.lan. (

    2014032801 ; Serial

    28800 ; Refresh

    7200 ; Retry

    604800 ; Expire

    86400 ; Negative Cache TTL

    )

@    IN    NS    proxy.home.lan.

proxy    IN    A    192.168.201.250

# vi /etc/resolv.conf

search localdomain home.lan

nameserver 127.0.0.1 


Step 5. squid 설정

x.x.x.x 부분에는 proxy 서버의 아이피를 반드시 넣어야 한다. 넣지 않으면 아래같은 에러 발생함.

Bungled /etc/squid/squid.conf line 70: generate-host-certificates=on dynamic_cert_mem_cache_size=4MB

# vim /etc/squid/squid.conf

#

# Recommended minimum configuration:

#


# 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 localnet src 127.0.0.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 CONNECT method CONNECT


sslproxy_cert_error allow all

#disable this in production, it is dangerous but useful for testing

#sslproxy_flags DONT_VERIFY_PEER

#

# Recommended minimum Access Permission configuration:

#

# Deny requests to certain unsafe ports

http_access deny !Safe_ports


# Deny CONNECT to other than secure SSL ports

http_access deny CONNECT !SSL_ports


# Only allow cachemgr access from localhost

http_access allow localhost manager

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 allow localnet

http_access allow localhost


# And finally deny all other access to this proxy

http_access deny all


# Squid normally listens to port 3128

http_port 3128


# Uncomment and adjust the following to add a disk cache directory.

#cache_dir ufs /var/cache/squid 100 16 256


# Leave coredumps in the first cache dir

coredump_dir /var/cache/squid


http_port x.x.x.x:3129 ssl-bump  \

  cert=/etc/squid/ssl_cert/myCA.pem \

  generate-host-certificates=on dynamic_cert_mem_cache_size=4MB


#this is what generates certs on the fly. Point to the CA you generated above.


https_port x.x.x.x:3130 ssl-bump intercept \

  cert=/etc/squid/ssl_cert/myCA.pem \

  generate-host-certificates=on dynamic_cert_mem_cache_size=4MB


acl step1 at_step SslBump1


ssl_bump peek step1

ssl_bump stare all

ssl_bump bump all

always_direct allow all


#

# 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 


Step 6. 클라이언트 측 인증서 등록







문서 상으로는 "Root Trusted Certificates" 에 등록하라는데 막상 수동으로 등록해 주어도 다른데서 나오네..

[링크 : http://roberts.bplaced.net/.../centos-6-guides/proxy-server/squid-transparent-proxy-http-https]


Step 7. 클라이언트 측 Proxy 설정

HTTP와 HTTPS를 다르게 설정했으니 포트도 서로 다르게 설정해야 한다.

  


Step 8. 확인

네이버 인증서가 임의로 발급한 루트 인증서로 바뀌어치기 된걸 확인할 수 있다.


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



+

2019.02.12

[링크 : https://www.tekyhost.com/squid-proxy-squid-caching-and-filtering-proxy/]

'프로그램 사용 > squid' 카테고리의 다른 글

squid refresh_pattern  (0) 2019.02.12
squid cachemgr  (0) 2019.02.12
ssl_crtd : The ssl_crtd helpers are crashing too rapidly, need help!  (0) 2019.02.11
haproxy - https proxy  (0) 2019.02.11
squid cache directory  (0) 2019.02.11
Posted by 구차니
프로그램 사용/squid2019. 2. 11. 15:38

의외로 엉뚱한(?) 에러..

감이 오는 녀석도 없고 때려 잡다가 겨우 찾았네..


$ ll /usr/lib64/squid

합계 872

-rwxr-xr-x 1 root root  5399  1월 30 02:50 basic_db_auth

-rwxr-xr-x 1 root root 11440  1월 30 02:51 basic_getpwnam_auth

-rwxr-xr-x 1 root root 23856  1월 30 02:51 basic_ldap_auth

-rwxr-xr-x 1 root root  5502  1월 30 02:50 basic_msnt_multi_domain_auth

-rwxr-xr-x 1 root root 24112  1월 30 02:51 basic_ncsa_auth

-rwxr-xr-x 1 root root 15568  1월 30 02:51 basic_nis_auth

-rwxr-xr-x 1 root root 19752  1월 30 02:51 basic_pam_auth

-rwxr-xr-x 1 root root  2975  1월 30 02:50 basic_pop3_auth

-rwxr-xr-x 1 root root 20136  1월 30 02:51 basic_radius_auth

-rwxr-xr-x 1 root root 15544  1월 30 02:51 basic_sasl_auth

-rwxr-xr-x 1 root root 15624  1월 30 02:51 basic_smb_auth

-rwxr-xr-x 1 root root  2657  1월 30 02:50 basic_smb_auth.sh

-rwxr-xr-x 1 root root 41584  1월 30 02:51 basic_smb_lm_auth

-rwxr-xr-x 1 root root 71424  1월 30 02:51 cachemgr.cgi

-rwxr-xr-x 1 root root  2515  1월 30 02:50 cert_tool

-rwxr-xr-x 1 root root 32272  1월 30 02:51 digest_edirectory_auth

-rwxr-xr-x 1 root root 24184  1월 30 02:51 digest_file_auth

-rwxr-xr-x 1 root root 28096  1월 30 02:51 digest_ldap_auth

-rwxr-xr-x 1 root root 20088  1월 30 02:51 diskd

-rwxr-xr-x 1 root root 15664  1월 30 02:51 ext_file_userip_acl

-rwxr-xr-x 1 root root 81984  1월 30 02:51 ext_kerberos_ldap_group_acl

-rwxr-xr-x 1 root root 23848  1월 30 02:51 ext_ldap_group_acl

-rwxr-xr-x 1 root root 11392  1월 30 02:51 ext_session_acl

-rwxr-xr-x 1 root root 15624  1월 30 02:51 ext_time_quota_acl

-rwxr-xr-x 1 root root 15608  1월 30 02:51 ext_unix_group_acl

-rwxr-xr-x 1 root root  5063  1월 30 02:50 ext_wbinfo_group_acl

-rwxr-xr-x 1 root root  5393  1월 30 02:50 helper-mux.pl

-rwxr-xr-x 1 root root 12449  1월 30 02:50 log_db_daemon

-rwxr-xr-x 1 root root 11400  1월 30 02:51 log_file_daemon

-rwxr-xr-x 1 root root 44760  1월 30 02:51 negotiate_kerberos_auth

-rwxr-xr-x 1 root root 15736  1월 30 02:51 negotiate_kerberos_auth_test

-rwxr-xr-x 1 root root 19832  1월 30 02:51 ntlm_fake_auth

-rwxr-xr-x 1 root root 63176  1월 30 02:51 ntlm_smb_lm_auth

-rwxr-xr-x 1 root root 87320  1월 30 02:51 ssl_crtd

-rwxr-xr-x 1 root root  3908  1월 30 02:50 storeid_file_rewrite

-rwxr-xr-x 1 root root 11312  1월 30 02:51 unlinkd

-rwxr-xr-x 1 root root 11368  1월 30 02:51 url_fake_rewrite

-rwxr-xr-x 1 root root  2526  1월 30 02:50 url_fake_rewrite.sh 


# ./ssl_crtd -c -s /var/lib/ssl_db

Initialization SSL db...

Done


# ll /var/lib/ssl_db/

합계 4

drwxr-xr-x 2 root root 6  2월 11 15:38 certs

-rw-r--r-- 1 root root 0  2월 11 15:38 index.txt

-rw-r--r-- 1 root root 1  2월 11 15:38 size 


[링크 : https://chimera40.wordpress.com/2018/07/18/install-and-configure-squid-with-ssl-bump.../]

'프로그램 사용 > squid' 카테고리의 다른 글

squid cachemgr  (0) 2019.02.12
howto make squid as https proxy  (0) 2019.02.11
haproxy - https proxy  (0) 2019.02.11
squid cache directory  (0) 2019.02.11
squid + 크롬 설정 및 log 확인  (0) 2019.02.11
Posted by 구차니
프로그램 사용/squid2019. 2. 11. 14:07


[링크 : https://serversforhackers.com/c/using-ssl-certificates-with-haproxy]

[링크 : https://www.securesign.kr/guides/HAProxy-SSL-Certificates-Install]

[링크 : https://blog.onlab.kr/2016/07/29/haproxy-ssl-가능하게-설치/]


헐.. caching 까진 지원을 못하나 보네..

[링크 : https://serverfault.com/questions/780150/how-to-cache-contents-in-haproxy]


프로젝트 포크한건가? 얘는 캐쉬된다고

[링크 : https://github.com/jiangwenyuan/nuster]

Posted by 구차니
프로그램 사용/squid2019. 2. 11. 11:03

squid 설정해도 무언가 저장하는게 없는거 같아 설정파일을 보다보니

cache_dir 이라는게 기본값으로는 주석처리 되어 있다. 

아무튼.. 이걸 해지하고 재가동하니 무언가 생기긴 하는데 내용을 보니


ufs라는 파일 시스템으로 생성되고 최대 100MB 까지 캐싱을 하도록 설정한다 라는 의미인 듯..

16 256 으로 이해


Edit the main configuration file, /etc/squid/squid.conf and confirm that the cache_dir directive is uncommented and looks similar to the following:
cache_dir ufs /var/spool/squid 100 16 256 

This line specifies the default settings for the cache_dir directive to be used in this example; it consists of the Squid storage format (ufs), the directory on the system where the cache resides (/var/spool/squid), the amount of disk space in megabytes to be used for the cache (100), and finally the number of first-level and second-level cache directories to be created (16 and 256 respectively). 

[링크 : https://access.redhat.com/.../sect-managing_confined_services-squid_caching_proxy-configuration_examples]



아래와 같은 형상으로 생겨났는데.. 저런 이유로(?) 1차, 2차 캐시로 구분이 되도록 생성되는 것으로 보인다.

# tree /var/spool/squid

/var/spool/squid

├── 00

│   ├── 00

│   │   ├── 00000000

│   │   ├── 00000001

│   │   ├── 00000002

│   │   ├── 00000003

...

│   │   ├── 0000005D

│   │   └── 0000005E

│   ├── 01

│   ├── 02

│   ├── 03

│   ├── 04

│   ├── 05

│   ├── 06

│   ├── 07

│   ├── 08

...

   └── FF

├── 01

│   ├── 00

│   ├── 01


...

│   └── FF

└── swap.state

 


파일 자체는.. DBase 3 데이터 파일이라는데... 실 데이터는 다른데 있는 건가?

# file /var/spool/squid/00/00/*

/var/spool/squid/00/00/00000000: DBase 3 data file (1049344 records)

/var/spool/squid/00/00/00000001: DBase 3 data file (1049344 records)

/var/spool/squid/00/00/00000002: DBase 3 data file (1049344 records)

/var/spool/squid/00/00/00000003: DBase 3 data file (1049344 records)

/var/spool/squid/00/00/00000004: DBase 3 data file (1049344 records)

/var/spool/squid/00/00/00000005: DBase 3 data file (1049344 records)

/var/spool/squid/00/00/00000006: little endian ispell hash file (?), 8-bit, no capitalization, 26 flags and 768 string characters

... 



Posted by 구차니
프로그램 사용/squid2019. 2. 11. 10:50

윈도우 기준으로 이야기 하면 크롬에서 설정하는게 아니라

크롬에서는 윈도우 네트워크의 proxy 설정창을 띄워준다.



그리고 나서 LAN 설정의 프록시 서버에, squid를 설치한 서버의 아이피를 치고

squid의 포트를 입력해주면 되는데 해당 설정 파일을 열어보면 아래와 비슷하게 나올 것인데...

# cat /etc/squid/squid.conf

#

# Recommended minimum configuration:

#


# Example rule allowing access from your local networks.

# Adapt to list your (internal) IP networks from where browsing

# should be allowed

acl localnet src 192.168.0.0/16 # RFC1918 possible internal network


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


#

# Recommended minimum Access Permission configuration:

#

# Deny requests to certain unsafe ports

http_access deny !Safe_ports


# Deny CONNECT to other than secure SSL ports

http_access deny CONNECT !SSL_ports


# Only allow cachemgr access from localhost

http_access allow localhost manager

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 allow localnet

http_access allow localhost


# And finally deny all other access to this proxy

http_access deny all


# Squid normally listens to port 3128

http_port 3128


# Uncomment and adjust the following to add a disk cache directory.

cache_dir ufs /var/spool/squid 100 16 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 


별다른 설정을 바꾸지 않았다면 기본값인 3128을 입력해주면 된다.


HIT라고 뜨는게 너무 없네..

다들 정적 페이지가 아니다 보니 그런건가.. 아니면 SSL 문제일려나?

$ cat /var/log/squid/access.log | grep HIT

1549848287.564      0 10.0.0.4 TCP_INM_HIT/304 334 GET http://auction.co.kr/ - HIER_NONE/- text/html

1549848307.300      0 10.0.0.4 TCP_IMS_HIT/304 315 GET http://image.iacstatic.co.kr/allkill/item/2019/02/20190208084157581r.jpg - HIER_NONE/- image/jpeg

1549848307.301      0 10.0.0.4 TCP_IMS_HIT/304 315 GET http://image.iacstatic.co.kr/allkill/item/2019/02/20190208104540991r.jpg - HIER_NONE/- image/jpeg

1549848307.303      0 10.0.0.4 TCP_IMS_HIT/304 315 GET http://image.iacstatic.co.kr/allkill/item/2019/02/20190208120658951r.jpg - HIER_NONE/- image/jpeg

1549848308.566      0 10.0.0.4 TCP_INM_HIT/304 333 GET http://www.auction.co.kr/ - HIER_NONE/- text/html

1549848310.806      0 10.0.0.4 TCP_INM_HIT/304 333 GET http://www.auction.co.kr/ - HIER_NONE/- text/html

1549848311.449      0 10.0.0.4 TCP_IMS_HIT/304 315 GET http://image.iacstatic.co.kr/allkill/item/2019/02/20190208110027731r.jpg - HIER_NONE/- image/jpeg

1549848311.453      0 10.0.0.4 TCP_IMS_HIT/304 315 GET http://image.iacstatic.co.kr/allkill/item/2019/02/20190208105748851r.jpg - HIER_NONE/- image/jpeg

1549848311.453      0 10.0.0.4 TCP_IMS_HIT/304 315 GET http://image.iacstatic.co.kr/allkill/item/2019/02/20190208095050481r.jpg - HIER_NONE/- image/jpeg

1549848521.823      0 10.0.0.4 TCP_MEM_HIT/200 1013 GET http://ocsp.trust-provider.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBR8sWZUnKvbRO5iJhat9GV793rVlAQUrb2YejS0Jvf6xCZU7wO94CTLVBoCEENSAj%2F6qJAfE5%2Fj9OXBRE4%3D - HIER_NONE/- application/ocsp-response

1549848521.832      0 10.0.0.4 TCP_MEM_HIT/200 852 GET http://ocsp.comodoca4.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBTrJdiQ%2Ficg9B19asFe73bPYs%2BreAQUdXGnGUgZvJ2d6kFH35TESHeZ03kCEFslzmkHxCZVZtM5DJmpVK0%3D - HIER_NONE/- application/ocsp-response

1549848559.829      0 10.0.0.4 TCP_MEM_HIT/200 961 GET http://ocsp.digicert.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBTBL0V27RVZ7LBduom%2FnYB45SPUEwQU5Z1ZMIJHWMys%2BghUNoZ7OrUETfACEAi4elAbvpzaLRZNPjlRv1U%3D - HIER_NONE/- application/ocsp-response

1549848559.835      0 10.0.0.4 TCP_MEM_HIT/200 961 GET http://ocsp.digicert.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBTBL0V27RVZ7LBduom%2FnYB45SPUEwQU5Z1ZMIJHWMys%2BghUNoZ7OrUETfACEAiIzVJfGSRETRSlgpHeuVI%3D - HIER_NONE/- application/ocsp-response

1549848559.840      0 10.0.0.4 TCP_MEM_HIT/200 961 GET http://ocsp.digicert.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBTBL0V27RVZ7LBduom%2FnYB45SPUEwQU5Z1ZMIJHWMys%2BghUNoZ7OrUETfACEAtqs7A%2Bsan2xGCSaqjN%2FrM%3D - HIER_NONE/- application/ocsp-response

1549848559.846      0 10.0.0.4 TCP_MEM_HIT/200 961 GET http://ocsp.digicert.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBTBL0V27RVZ7LBduom%2FnYB45SPUEwQU5Z1ZMIJHWMys%2BghUNoZ7OrUETfACEA8sEMlbBsCTf7jUSfg%2BhWk%3D - HIER_NONE/- application/ocsp-response 


일단.. TCP_MISS/200 이면 캐싱되지 않아서 원서버에 직접 요청해서 받는거 같은데

TCP_IMS_HIT/304 이런건 거의 안뜨네...

Such as when an allstaff email goes out saying "check this site out..."

  • TCP_MISS/200 means that the requested document was not in the cache but it could fetch it OK from the web server. The direct at the end says that the file was fetched from the webserver.
  • TCP_IMS_HIT/304 means that the client asked if the file has changed, and squid checked its date/time on the webserver and found it had not changed, so it gave a copy of the file to the client out of its local cache. 

[링크 : https://askubuntu.com/questions/323241/how-to-know-if-squid-proxy-is-doing-the-cache-correctly]

[링크 : https://wiki.squid-cache.org/SquidFaq/SquidLogs]

'프로그램 사용 > squid' 카테고리의 다른 글

haproxy - https proxy  (0) 2019.02.11
squid cache directory  (0) 2019.02.11
squid 설치 및 설정 유틸리티  (0) 2019.02.08
squid 상태 모니터링  (0) 2019.02.08
https proxy - squid  (0) 2019.02.07
Posted by 구차니
프로그램 사용/squid2019. 2. 8. 16:24

웬지 모를 파이썬의 스멜이 난다..


[링크 : https://sourceforge.net/projects/squidgui/files/]

'프로그램 사용 > squid' 카테고리의 다른 글

haproxy - https proxy  (0) 2019.02.11
squid cache directory  (0) 2019.02.11
squid + 크롬 설정 및 log 확인  (0) 2019.02.11
squid 상태 모니터링  (0) 2019.02.08
https proxy - squid  (0) 2019.02.07
Posted by 구차니
프로그램 사용/squid2019. 2. 8. 16:22

centos 에서는 squid 패키지에 포함된 것으로 보이는데


아래 명령어로 무언가 나오는데 멀 보는진 모르겠다 -_ㅠ

# squidclient -h localhost cache_object://localhost/ mgr:utilization 


# squidclient -h localhost cache_object://localhost/counters 

HTTP/1.1 200 OK

Server: squid/3.5.20

Mime-Version: 1.0

Date: Mon, 11 Feb 2019 08:04:04 GMT

Content-Type: text/plain;charset=utf-8

Expires: Mon, 11 Feb 2019 08:04:04 GMT

Last-Modified: Mon, 11 Feb 2019 08:04:04 GMT

X-Cache: MISS from localhost.localdomain

X-Cache-Lookup: MISS from localhost.localdomain:3128

Via: 1.1 localhost.localdomain (squid/3.5.20)

Connection: close


sample_time = 1549872194.638742 (Mon, 11 Feb 2019 08:03:14 GMT)

client_http.requests = 1074

client_http.hits = 0

client_http.errors = 5

client_http.kbytes_in = 977

client_http.kbytes_out = 4855

client_http.hit_kbytes_out = 0

server.all.requests = 707

server.all.errors = 0

server.all.kbytes_in = 4728

server.all.kbytes_out = 1001

server.http.requests = 707

server.http.errors = 0

server.http.kbytes_in = 4728

server.http.kbytes_out = 1001

server.ftp.requests = 0

server.ftp.errors = 0

server.ftp.kbytes_in = 0

server.ftp.kbytes_out = 0

server.other.requests = 0

server.other.errors = 0

server.other.kbytes_in = 0

server.other.kbytes_out = 0

icp.pkts_sent = 0

icp.pkts_recv = 0

icp.queries_sent = 0

icp.replies_sent = 0

icp.queries_recv = 0

icp.replies_recv = 0

icp.query_timeouts = 0

icp.replies_queued = 0

icp.kbytes_sent = 0

icp.kbytes_recv = 0

icp.q_kbytes_sent = 0

icp.r_kbytes_sent = 0

icp.q_kbytes_recv = 0

icp.r_kbytes_recv = 0

icp.times_used = 0

cd.times_used = 0

cd.msgs_sent = 0

cd.msgs_recv = 0

cd.memory = 0

cd.local_memory = 7

cd.kbytes_sent = 0

cd.kbytes_recv = 0

unlink.requests = 843

page_faults = 0

select_loops = 25783

cpu_time = 8.574439

wall_time = 49.492095

swap.outs = 216

swap.ins = 0

swap.files_cleaned = 0

aborted_requests = 4


# squidclient -h localhost mgr:info

HTTP/1.1 200 OK

Server: squid/3.5.20

Mime-Version: 1.0

Date: Mon, 11 Feb 2019 08:02:00 GMT

Content-Type: text/plain;charset=utf-8

Expires: Mon, 11 Feb 2019 08:02:00 GMT

Last-Modified: Mon, 11 Feb 2019 08:02:00 GMT

X-Cache: MISS from localhost.localdomain

X-Cache-Lookup: MISS from localhost.localdomain:3128

Via: 1.1 localhost.localdomain (squid/3.5.20)

Connection: close


Squid Object Cache: Version 3.5.20

Build Info:

Service Name: squid

Start Time:     Mon, 11 Feb 2019 07:51:14 GMT

Current Time:   Mon, 11 Feb 2019 08:02:00 GMT

Connection information for squid:

        Number of clients accessing cache:      2

        Number of HTTP requests received:       1018

        Number of ICP messages received:        0

        Number of ICP messages sent:    0

        Number of queued ICP replies:   0

        Number of HTCP messages received:       0

        Number of HTCP messages sent:   0

        Request failure ratio:   0.00

        Average HTTP requests per minute since start:   94.5

        Average ICP messages per minute since start:    0.0

        Select loop called: 23961 times, 26.970 ms avg

Cache information for squid:

        Hits as % of all requests:      5min: 0.0%, 60min: 0.0%

        Hits as % of bytes sent:        5min: 1.9%, 60min: 2.1%

        Memory hits as % of hit requests:       5min: 0.0%, 60min: 0.0%

        Disk hits as % of hit requests: 5min: 0.0%, 60min: 0.0%

        Storage Swap size:      91804 KB

        Storage Swap capacity:  89.7% used, 10.3% free

        Storage Mem size:       3860 KB

        Storage Mem capacity:    1.5% used, 98.5% free

        Mean Object Size:       135.20 KB

        Requests given to unlinkd:      843

Median Service Times (seconds)  5 min    60 min:

        HTTP Requests (All):   0.04277  0.05633

        Cache Misses:          0.03241  0.03829

        Cache Hits:            0.00000  0.00000

        Near Hits:             0.00000  0.00000

        Not-Modified Replies:  0.00000  0.00000

        DNS Lookups:           0.11405  0.11926

        ICP Queries:           0.00000  0.00000

Resource usage for squid:

        UP Time:        646.235 seconds

        CPU Time:       8.031 seconds

        CPU Usage:      1.24%

        CPU Usage, 5 minute avg:        1.71%

        CPU Usage, 60 minute avg:       1.32%

        Maximum Resident Size: 237808 KB

        Page faults with physical i/o: 0

Memory accounted for:

        Total accounted:         7691 KB

        memPoolAlloc calls:    224798

        memPoolFree calls:     231466

File descriptor usage for squid:

        Maximum number of file descriptors:   16384

        Largest file desc currently in use:     69

        Number of file desc currently in use:   31

        Files queued for open:                   0

        Available number of file descriptors: 16353

        Reserved number of file descriptors:   100

        Store Disk files open:                   0

Internal Data Structures:

           740 StoreEntries

           273 StoreEntries with MemObjects

           264 Hot Object Cache Items

           679 on-disk objects


[링크 : http://www.monitis.com/blog/how-to-monitor-squid-proxy-server/]

[링크 : https://linux.die.net/man/1/squidclient]

[링크 : https://wiki.squid-cache.org/SquidClientTool]

'프로그램 사용 > squid' 카테고리의 다른 글

haproxy - https proxy  (0) 2019.02.11
squid cache directory  (0) 2019.02.11
squid + 크롬 설정 및 log 확인  (0) 2019.02.11
squid 설치 및 설정 유틸리티  (0) 2019.02.08
https proxy - squid  (0) 2019.02.07
Posted by 구차니

많네... 귀찮은데 걍 openstack 까는게 편하려나?


[링크 : https://www.linux-kvm.org/page/Management_Tools]



+

아래 두개가 라이센스(apache)문제 없이 쓸수 있는 웹 기반으로 보이고

UI가 심플해서(libvirt 만 지원하는 녀석이라) 무난해 보인다.


[링크 : https://ovirt.org/download/]

[링크 : https://github.com/retspen/webvirtmgr/wiki/Screenshots]

Posted by 구차니
프로그램 사용/squid2019. 2. 7. 18:57

HTTPS로 통신하면 암호화 되어 중간에서 볼 수 없게 되므로

프록시를 쓸수 없게 되는데, 프록시를 통해 외부 접속을 HTTPS로 해주고

내부와도 HTTPS로 해주는 설정을 찾는중


[링크 : https://wiki.squid-cache.org/Features/HTTPS]

[링크 : https://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube]

[링크 : https://wiki.squid-cache.org/ConfigExamples/Streams/Other]


HTTPS proxy 설정법

[링크 : http://roberts.bplaced.net/.../proxy-server/squid-transparent-proxy-http-https]


업체 솔루션 소개, 설정법

[링크 : https://www.ibm.com/.../t_ritpp_mod_proxy_config_set.html]

[링크 : https://origin-symwisedownload.symantec.com/.../streaming_proxy_co.htm]

[링크 : https://docs.oracle.com/cd/E19438-01/820-0862/adyef/index.html]

[링크 : https://docs.citrix.com/en-us/netscaler-sd-wan-wanop/10/video-caching/configure-video-caching.html]


+

video proxy

[링크 : http://nginx.org/en/docs/stream/ngx_stream_core_module.html]

[링크 : https://cachevideos.com/]


+

2019.02.11

[링크 : https://wiki.squid-cache.org/Features/HTTPS] 2.5


sslbump + dynamic SSL gen.

[링크 : https://wiki.squid-cache.org/Features/DynamicSslCert] 3.2

[링크 : https://wiki.squid-cache.org/Features/BumpSslServerFirst] 3.3


[링크 : https://wiki.squid-cache.org/Features/SslPeekAndSplice] 3.5

'프로그램 사용 > squid' 카테고리의 다른 글

haproxy - https proxy  (0) 2019.02.11
squid cache directory  (0) 2019.02.11
squid + 크롬 설정 및 log 확인  (0) 2019.02.11
squid 설치 및 설정 유틸리티  (0) 2019.02.08
squid 상태 모니터링  (0) 2019.02.08
Posted by 구차니