'프로그램 사용'에 해당되는 글 2515건

  1. 2019.03.20 fail2ban with 404 2
  2. 2019.03.20 웹 통계 프로그램 물색중
  3. 2019.03.20 docker cassandra selinux
  4. 2019.03.20 centos docker compose iptable error 2
  5. 2019.03.20 postgresql 계정은 있는데 로그인 안될때
  6. 2019.03.20 nginx 502 bad gateway와 audit
  7. 2019.03.17 kvm snapshot
  8. 2019.03.17 nas samba warn
  9. 2019.03.15 url_rewriter squid
  10. 2019.03.14 postgresql WAL?

회사 홈페이지 보니 예전에 집에서 라즈베리 서버 돌리던때와 같이

권한탈취하기 위해서 각종 url 입력하는 놈들이 또 보이는데

항상 그렇지만 아이피 차단한다고 해서 어떻게 될 놈들도 아니고...


고민하다 보니 404 에러를 1초에 몇번 혹은

1분 이내에 몇번 이상 내는 놈들에게 한해서는 자동 차단하면 어떨까 싶어서 찾아보니 있다!


[링크 : https://serverfault.com/questions/849854/fail2ban-blocking-behaviours-depending-on-the-status-code]

[링크 : https://serverfault.com/questions/918151/how-to-block-ips-that-cause-excessive-404-errors-with-fail2ban]


2019.04.01

[링크 : https://medium.com/@animirr/brute-force-protection-node-js-examples-cd58e8bd9b8d]

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

fail2ban error 100  (0) 2017.03.06
fail2ban ssh 차단 실패???  (0) 2017.03.06
fail2ban phpmyadmin  (0) 2017.02.28
fail2ban 재시작을 위한 차단목록 추가?  (0) 2017.02.15
fail2ban 차단 관련...  (0) 2017.02.09
Posted by 구차니

webalizer가 솔찍히 보기 편한 통계는 아니지만

그거에 거부감을 느끼는 인간 때문에 다른 통계 프로그램 찾는중

근데 webalizer에다가 일별로 접속 통계 이런식으로는 커스터마이징이 안되려나?


[링크 : https://goaccess.io]

[링크 : https://awstats.sourceforge.io/]

[링크 : http://www.webalizer.org/]


[링크 : https://www.weblogexpert.com/]

Posted by 구차니
프로그램 사용/docker2019. 3. 20. 15:17

docker를 통해 cassandra를 구동하는데

csql을 찾지 못해서 헤매는걸 해결하지 못함... 

일단 시간도 없고 귀찮아서 setenforce 0로 하고 다음기회에..


[링크 : https://github.com/instaclustr/cassandra-docker]


+

2019.03.22


찾아보니 이런 에러발생

type=AVC msg=audit(1553061777.728:1930): avc:  denied  { open } for  pid=23358 comm="python" path="/cql/create-keyspace.cql" dev="dm-0" ino=35212277 scontext=system_u:system_r:container_t:s0:c203,c1009 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=1 


이건 어떻게 해결해야 한다냐....

일단은 ll -alZ를 통해서 컨텍스를 보니 아래와 같고

tcontext의 내용과 동일하다.

-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 cql/create-keyspace.cql 


centos 7에서 확인해보니 container_t 라는건 안보이고 다른걸로 이름을 지어주어야 하나..

# cat /etc/selinux/targeted/contexts/lxc_contexts

process = "system_u:system_r:svirt_lxc_net_t:s0"

content = "system_u:object_r:virt_var_lib_t:s0"

file = "system_u:object_r:svirt_sandbox_file_t:s0"

sandbox_kvm_process = "system_u:system_r:svirt_qemu_net_t:s0"

sandbox_kvm_process = "system_u:system_r:svirt_qemu_net_t:s0"

sandbox_lxc_process = "system_u:system_r:svirt_lxc_net_t:s0"

[링크 : https://prefetch.net/blog/2017/09/30/using-docker-volumes-on-selinux-enabled-servers/]


검색하다 보니 이런게 있었던거 같은데..

# chcon -Rt svirt_sandbox_file_t /var/db

[링크 : https://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/]


+

2019.04.29

If a file is labeled svirt_sandbox_file_t, then by default all containers can read it. But if the containers write into a directory that has svirt_sandbox_file_t ownership, they write using their own category (which in this case is "c186,c641). If you start the same container twice, it will get a new category the second time ( a different category than it had the first time). The category system isolates containers from one another. 


[링크 : https://access.redhat.com/.../docker_selinux_security_policy]

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

docker-compose up/down 주의사항  (0) 2019.03.24
docker 컨테이너 자동시작  (0) 2019.03.21
centos docker compose iptable error  (2) 2019.03.20
docker inspect  (0) 2019.02.28
docker 복원하기  (2) 2019.02.27
Posted by 구차니
프로그램 사용/docker2019. 3. 20. 10:27

docker-compose를 통해서 docker를 생성하는데 

Creating network "docker_default" with the default driver

ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule:  (iptables failed: iptables --wait -t nat -I DOCKER -i br-7d5a8bad2e77 -j RETURN: iptables: No chain/target/match by that name.

 (exit status 1)) 


요런에러가 발생하는데...


환경은 centos 7. 아래와 같이 설정하니 일단은 넘어가네


# vim /lib/systemd/system/docker.service

[Unit]

Description=Docker Application Container Engine

Documentation=http://docs.docker.com

After=network.target

Wants=docker-storage-setup.service

Requires=docker-cleanup.timer 


After=network.target docker.socket

Requires=network.target docker.socket 

[링크 : https://github.com/sameersbn/docker-gitlab/issues/499]

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

docker 컨테이너 자동시작  (0) 2019.03.21
docker cassandra selinux  (0) 2019.03.20
docker inspect  (0) 2019.02.28
docker 복원하기  (2) 2019.02.27
docker 개념 다시 조사..  (0) 2019.02.01
Posted by 구차니

pg_hba.conf 외에도, role을 바꾸어 주어야 하네?


 ALTER ROLE "asunotest" WITH LOGIN;

[링크 : https://stackoverflow.com/questions/35254786/postgresql-role-is-not-permitted-to-log-in]

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

postgresql import from csv  (0) 2019.06.04
postgresql password chg  (0) 2019.06.04
postgresql WAL?  (0) 2019.03.14
postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
Posted by 구차니
프로그램 사용/nginx2019. 3. 20. 09:39

하라는데로 하니 되긴 한데

결론은.. selinux와 쌍벽을 이룰 끝판왕의 도래인가?



대개는 403에러에 대해서 나오는데 운이 좋게 쉽게 검색한듯..

일단 audit.log를 보는데 먼 소리인지 모르겠다 -ㅁ-

nginx가 http를 돌리기 위해서 tcp_socket을 쓰려는데 아무래도 3000번으로 80번으로 돌리려고 하다 보니 

well known이거나 1024번 이하 포트라서 audit에 의해 걸러지고 있었을 지도?


# cat /var/log/audit/audit.log | grep nginx | grep denied

type=AVC msg=audit(1553041491.494:21600): avc:  denied  { name_connect } for  pid=17240 comm="nginx" dest=3000 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:ntop_port_t:s0 tclass=tcp_socket permissive=0


# cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M swnginx

******************** IMPORTANT ***********************

To make this policy package active, execute:


semodule -i swnginx.pp


# semodule -i swnginx.pp

 


[링크 : https://crystalcube.co.kr/181]

Posted by 구차니
Posted by 구차니

윈10에서 NAS 삼바로 접속시에 자꾸 경고를 띄우는데

(우클릭만 해도 경고 -_-) 그거 끄는 법


[링크 : https://www.tekrevue.com/tip/these-files-might-be-harmful-to-your-computer-disable/]

'프로그램 사용 > SMB(Samba)' 카테고리의 다른 글

smb.conf 멀티채널 지원  (0) 2026.01.05
cifs mount 실패시 설치 패키지  (0) 2023.02.10
smb 와 selinux 설정  (0) 2019.02.14
smb 서비스 속도향상하기(SSD-bcache, AIO)  (0) 2019.02.01
samba acpi s3 wake up  (0) 2017.08.11
Posted by 구차니
프로그램 사용/squid2019. 3. 15. 16:23

store url_rewrite_program within ssl bump


[링크 : https://github.com/rchunping/squid-urlrewrite]

[링크 : https://mindchasers.com/dev/app-squid-redirect]


[링크 : https://www.npmjs.com/package/nodecap2]

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

squid storeurl_rewrite  (0) 2019.04.02
lynx proxy  (0) 2019.03.27
squid hierarchy  (0) 2019.03.14
squid url_rewrite_program  (0) 2019.03.14
squid log code  (0) 2019.03.01
Posted by 구차니

서버를 보다보니 뭔가가 주기적으로 IO를 일으키는게 보여서

프로세스 확인해보니 특정 VM

특정 VM에다가 iotop 깔아서 보니 아래 녀석이 튀어나온다.

% postgres: wal writer process

% postgres: checkpointer process

% postgres: autovacuum worker process   dbname


그래서 WAL이 먼가 찾아보니 Write Ahead Logging의 약자라고..

WAL을 쓰면 하드에 쓰는 주기가 줄어든다고 하는데..

[링크 : http://postgresql.kr/docs/9.6/wal-intro.html]


[링크 : https://www.postgresql.org/docs/9.6/wal-intro.html]


체크포인트는 더티를 쓰는 거고(write back에 가깝나?)

 At checkpoint time, all dirty data pages are flushed to disk and a special checkpoint record is written to the log file.

[링크 : https://www.postgresql.org/docs/9.2/wal-configuration.html]

[링크 : https://www.postgresql.org/docs/8.2/wal-configuration.html]


얘는 garbage collector 인거 같네

 VACUUM -- garbage-collect and optionally analyze a database

[링크 : https://www.postgresql.org/docs/8.2/sql-vacuum.html]


[링크 : https://www.postgresql.org/docs/8.2/runtime-config-autovacuum.html]

[링크 : https://www.postgresql.org/docs/8.2/routine-vacuuming.html]



읽으려니 눈에 안들어 오네.. ㅠㅠ

[링크 : https://www.cybertec-postgresql.com/en/postgresql-writer-and-wal-writer-processes-explained/]

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

postgresql password chg  (0) 2019.06.04
postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
Posted by 구차니