System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1404 댓글 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 | [linux] apache, php, jsp 환경설정하기.. | hooni | 2003.04.23 | 15316 |
57 | System/OS | [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. | hooni | 2003.04.23 | 14783 |
56 | System/OS | [linux] 간단한 NAT 설정 script | hooni | 2003.04.23 | 12662 |
55 | System/OS | [linux] iptables 명령어 매뉴얼(options) | hooni | 2003.04.23 | 11410 |
54 | System/OS | [linux] 패킷의 소스 주소 바꾸기 | hooni | 2003.04.23 | 18864 |
53 | System/OS | [linux] 패킷 스니퍼링 | hooni | 2003.04.23 | 16387 |
52 | System/OS | [windows] 배치(bat)파일 제작 방법 | hooni | 2003.04.23 | 17069 |
51 | System/OS | [windows] 여러가지 활용 팁 | hooni | 2003.04.23 | 20039 |
50 | System/OS | [windows] 도스 사용 팁 | hooni | 2003.04.23 | 17900 |
49 | System/OS | [windows] 98/ME 속도 빠르게 튜닝(부팅,메모리,레지스터) | hooni | 2003.04.23 | 50533 |
48 | System/OS | [linux] ipfwadm를 이용한 패킷필터링(구버전) | hooni | 2003.04.23 | 13103 |
47 | System/OS | [linux] ipchains 사용예(패킷 필터링) | hooni | 2003.04.23 | 14244 |