System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1241 댓글 0
# 내 서버 설정 (firewall.sh)
#!/bin/bash
# iptables automation script
iptables -F
# open 22port first for ssh
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
# configure for basic policy
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# accept to localhost
iptables -A INPUT -i lo -j ACCEPT
# accept to established and related
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# open 80 port for apache
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# save the configuration
/sbin/service iptables save
# print out
iptables -L -v
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
58 | System/OS | [java] Tomcat/UTF-8 or All 지원 ㅎㅎ | hooni | 2013.04.23 | 16745 |
57 | System/OS | [windows] 배치(bat)파일 제작 방법 | hooni | 2003.04.23 | 17008 |
56 | System/OS | [switch] 시스코 스위치 관리자 암호 초기화 방법 | hooni | 2013.04.23 | 17186 |
55 | System/OS | [windows] 패스워드를 잊어먹었을때.. | hooni | 2003.04.23 | 17294 |
54 | System/OS | [linux] 최소한의 커널 설정(커널설치 전체과정) | hooni | 2003.04.23 | 17404 |
53 | System/OS | [linux] 메일서버 세팅정보(sendmail) | hooni | 2003.04.23 | 17407 |
52 | System/OS | [switch] 시스코 카탈리스트(Cisco Catalyst) 기본 설정 | hooni | 2013.04.23 | 17496 |
51 | System/OS | 무선 인증 서버.. 김도.. ㅋㅋ | hooni | 2013.04.23 | 17595 |
50 | System/OS | 네트워크별 MTU(최대 전송 단위) | hooni | 2013.04.23 | 17641 |
49 | System/OS | [windows] 도스 사용 팁 | hooni | 2003.04.23 | 17812 |
48 | System/OS | [linux] 커널 컴파일, 설정 | hooni | 2003.04.23 | 17846 |
47 | System/OS | [linux] 리눅스,유닉스 /proc/stat 파일 보는 법 | hooni | 2013.04.23 | 17917 |