System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1235 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
154 | System/OS | [windows] 도스 사용 팁 | hooni | 2003.04.23 | 17804 |
153 | System/OS | 네트워크별 MTU(최대 전송 단위) | hooni | 2013.04.23 | 17641 |
152 | System/OS | 무선 인증 서버.. 김도.. ㅋㅋ | hooni | 2013.04.23 | 17595 |
151 | System/OS | [switch] 시스코 카탈리스트(Cisco Catalyst) 기본 설정 | hooni | 2013.04.23 | 17496 |
150 | System/OS | [linux] 메일서버 세팅정보(sendmail) | hooni | 2003.04.23 | 17407 |
149 | System/OS | [linux] 최소한의 커널 설정(커널설치 전체과정) | hooni | 2003.04.23 | 17393 |
148 | System/OS | [windows] 패스워드를 잊어먹었을때.. | hooni | 2003.04.23 | 17294 |
147 | System/OS | [switch] 시스코 스위치 관리자 암호 초기화 방법 | hooni | 2013.04.23 | 17186 |
146 | System/OS | [windows] 배치(bat)파일 제작 방법 | hooni | 2003.04.23 | 17000 |
145 | System/OS | [java] Tomcat/UTF-8 or All 지원 ㅎㅎ | hooni | 2013.04.23 | 16743 |
144 | System/OS | [linux] 네트워크 커널 설정.. | hooni | 2003.04.23 | 16470 |
143 | System/OS | [linux] 메타(기호)문자의 의미와 사용 | hooni | 2003.04.23 | 16381 |