작은숲:위키노트/데비안 설정
이 문서에 있는 설정들은 DebianUsers, Debian GNU/Linux, KLDP, KLTP 등의 문서들을 참고해서 자주 사용하는 내용들을 정리해놓은 것이다. 아래 설정들은 데비안 시스템을 기준으로 한 것이므로, 만약 다른 리눅스 배포본을 사용하실 때는 적절히 수정해서 사용해야한다.
데비안 설정
방화벽 뒤에 있는 데비안 박스의 APT 설정
방화벽 뒤에서는 FTP의 passive 모드가 막혀서 apt-get이 제대로 동작하지 않을 수 있다. 이런 경우에는 /etc/apt/apt.conf 파일을 만들어 아래 내용을 넣어주면 된다.
# /etc/apt/apt.conf
Acquire
{ ftp
{
Passive "false";
};
};
매직키 비활성화시키기
매직키를 활성화시켜두면, 일반 사용자도 셧다운 시킬 수가 있다. 그래서 아래와 같은 옵션을 /etc/sysctl.conf 파일에 설정한다.
# /etc/sysctl.conf
kernel.sysrq = 0
sysctl 설정
/etc/sysctl.conf에 다음을 추가한다.
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.tcp_fin_timeout = 30
adduser 설정
/etc/adduser.conf 설정 변경
USERGROUPS=no
USERS_GID=500
데몬 설정
아파치에서 Teleport 류의 프로그램의 접근 막기
WebZip이나 Teleport 등의 프로그램은 홈페이지의 모든 페이지를 긁어가기에 아주 유용한 프로그램이다. 미러 페이지를 만드는 식의 일을 아주 간단하게 해주는 프로그램이다. 이런 프로그램들의 접근을 막기를 원한다면 /etc/apache/srm.conf (혹은 /etc/apache/httpd.conf) 파일에 아래 설정을 추가하면 된다.
# /etc/apache/srm.conf
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
BrowserMatch "Teleport" no_access
BrowserMatch "WebZIP" no_access
BrowserMatch "WebTrack-HTTPP" no_access
BrowserMatch "WebSymmetrix" no_access
BrowserMatch "NamoWebEditor" no_access
Proftpd 설정
/etc/proftpd.conf에 다음 내용을 추가한다.
UseReverseDNS off
IdentLookups off
# Default message when one connect the server.
ServerIdent on "What are you doing now? "
RootLogin off
# Limit bandwidth in bps
#RateReadBPS 256
#RateReadFreeBytes 5120
#RateReadHardBPS on
# Maximum number of clients
MaxClients 10
# Maximum number of clients per host at the same time
MaxClientsPerHost 3
# Timeout
TimeoutIdle 900
TimeoutNoTransfer 900
TimeoutLogin 300
samba 설정
Samba 설정을 위해 /etc/samba/smb.conf 파일을 연다.
첫부분 [global] 아래에 다음을 추가한다.
hide dot files = yes
veto files = /.?*/
그리고, 아래 항목이 활성화되어 있는지 확인한다.
invalid users = root
Share Definitions 항목 아래에 있는 [homes] 설정에 다음을 확인한다.
writable = yes
create mask = 0644
directory mask = 0755
ssh 설정
/etc/ssh/sshd_config 설정 변경
# Change to yes to enable tunnelled clear text passwords
#PasswordAuthentication no
PasswordAuthentication yes
[[위키노트:Portsentry|Portysentry] 설정
/etc/default/portsentry 설정 변경
TCP_MODE="atcp"
UDP_MODE="sudp"
PHP 설정
/etc/php5/apache2/php.ini 설정 변경
allow_url_fopen = Off
magic_quotes_gpc = On
| 배포판 | |
|---|---|
| 서버 프로그램 | |
| 시스템 도구 | |
| 시스템 보안 | |
| 시스템 설정 | |
| HOWTO 문서 | |
| 사용자 설정 | |
| 활용 | |
| 명령어 | |