프로그램 사용/LDAP2019. 2. 12. 18:54

봐도 이해가 좀 안되는데..

LDAP로 다른 리눅스 시스템에 연동해서 로그인이 가능하다는 건가?

그러면 사용자 디렉토리랑은 어떻게 써야 하지?


[링크 : https://www.onlinelms.org/mod/book/view.php?id=10&chapterid=33]

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

ldap with gitlab  (0) 2019.02.12
ldap 구축  (0) 2019.02.12
sso ldap kerberos  (0) 2019.01.17
ldap samba  (0) 2019.01.17
ldap nfs  (0) 2019.01.17
Posted by 구차니
프로그램 사용/LDAP2019. 2. 12. 18:51

openLDAP로 통합하는게 꽤 매력적으로 보이네?

현재 고려중인건.. SVN, SMB, GITLAB, LINUX에 대해서 통합!


[링크 : https://medium.com/happyprogrammer-in-jeju/ldap-프토토콜-맛보기-15b53c6a6f26]

[링크 : https://ldap.or.kr/ldap을-이용한-oslinuxaix인증-pam-사례3/]

[링크 : http://www.dustbox.kr/2018/01/27/LDAP-NIS구축-1/]

[링크 : http://blog.hkwon.me/use-openldap-part1/]

[링크 : http://jo.centis1504.net/?p=294]

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

ldap with gitlab  (0) 2019.02.12
ldap 리눅스 서버 계정 통합  (0) 2019.02.12
sso ldap kerberos  (0) 2019.01.17
ldap samba  (0) 2019.01.17
ldap nfs  (0) 2019.01.17
Posted by 구차니

오늘 서버 밀려고 BIOS 들어가서 보는데

왜 회사 서버 전부 RAID0로 묶였나 했는데 이런 비밀이 숨겨져 있었을 줄이야..

단지. 가장 위에 Auto Configure RAID 0 가 있다는 이유였냐?!!!?

이 mi 친 놈들 -_-



[링크 : https://youtu.be/sC3hhoj-huo?t=64]

[링크 : https://www.dell.com/.../documents~esupport-qrl-perc-autoconfig-raid0-en-v1.aspx]

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

시간이 훅훅 가는구만  (2) 2019.02.21
히이이이익 결국!!!!  (0) 2019.02.19
기술의 이해없이 기술을 이용하는 시대  (3) 2019.01.31
퇴직금... 후...  (2) 2019.01.23
서버 설정 완.. 료?  (0) 2019.01.22
Posted by 구차니

df -h와

ls -alh 의 용량이 서로 다르게 나오는 경우가 있어서 찾아보는데..


du는 실제 데이터가 있는 크기만 보는건가..

그렇게 따지면.. mount도 실 데이터의 크기만 보는거고

ls -alh 이나 tar로 압축되는 용량과 서로 다르게 카운트 된다는 의미일려나?


This is a feature that saves actual hard disk space when huge files that are mostly zeroes are stored.  ls will return the apparent file size, but du will show the apparent size of the file minus the size of the holes in the file (which is how much space the file actually uses on the disk). 

[링크 : https://unix.stackexchange.com/questions/435499/qcow2-actual-size]

[링크 : https://askubuntu.com/questions/321465/ambiguity-using-ls-l-and-file-commands-on-a-qcow-file]



+

내용은 나중에 봐야겠다...

[링크 : https://unix.stackexchange.com/questions/406526/du-df-and-ls-reporting-different-disk-usage]

[링크 : https://www.lisenet.com/2014/so-what-is-the-size-of-that-file/]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

sparse file with cp  (0) 2019.02.15
qcow2 sparse file  (0) 2019.02.14
kvm 서비스 종료하기  (0) 2019.02.12
kvm 관리용 툴(웹)  (0) 2019.02.08
kvm virsh 도메인 목록 확인하기  (0) 2019.02.03
Posted by 구차니

libvirt는 해봤는데 d는 생각을 못했네 -_-


# systemctl stop libvirtd 


[링크 : https://doc.opensuse.org/documentation/leap/virtualization/html/book.virt/cha.libvirt.overview.html]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

qcow2 sparse file  (0) 2019.02.14
qcow2 파일크기의 오류?  (0) 2019.02.12
kvm 관리용 툴(웹)  (0) 2019.02.08
kvm virsh 도메인 목록 확인하기  (0) 2019.02.03
kvm qemu qcow2 vs raw with windows guest  (0) 2019.02.01
Posted by 구차니
프로그램 사용/squid2019. 2. 12. 11:09

squid.conf에 이런게 있어서 무슨 의미인가 보는 중

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 


봐도 모르겠다!!!!

usage: refresh_pattern [-i] regex min percent max [options]


By default, regular expressions are CASE-SENSITIVE.  To make

them case-insensitive, use the -i option.


'Min' is the time (in minutes) an object without an explicit

expiry time should be considered fresh. The recommended

value is 0, any higher values may cause dynamic applications

to be erroneously cached unless the application designer

has taken the appropriate actions.


'Percent' is a percentage of the objects age (time since last

modification age) an object without explicit expiry time

will be considered fresh.


'Max' is an upper limit on how long objects without an explicit

expiry time will be considered fresh. The value is also used

to form Cache-Control: max-age header for a request sent from

Squid to origin/parent.


options: override-expire

override-lastmod

reload-into-ims

ignore-reload

ignore-no-store

ignore-private

max-stale=NN

refresh-ims

store-stale

[링크 : http://www.squid-cache.org/Doc/config/refresh_pattern/]


기본적인 걸 캐싱하지 않도록 되어 있는데 이걸 60분으로 바꾸니 먼가 되긴 하는 듯?

#refresh_pattern .              0       20%     4320

refresh_pattern .               60      20%     4320 

[링크 : http://etutorials.org/.../Chapter+7.+Disk+Cache+Basics/7.7+refresh_pattern/]

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

squid cache 정책  (0) 2019.02.13
squid log format  (0) 2019.02.13
squid cachemgr  (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
Posted by 구차니
프로그램 사용/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 구차니