System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1393 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
178 | System/OS | [windows] 윈도우 사용자 계정 로그인 암호 분실, 암호 변경하는 방법 | hooni | 2015.07.09 | 21511 |
177 | System/OS | [windows] 원격 데스크탑(터미널 서비스) 포트 변경 | hooni | 2013.04.23 | 16352 |
176 | System/OS | [windows] 여러가지 활용 팁 | hooni | 2003.04.23 | 20027 |
175 | System/OS | [windows] 배치(bat)파일 제작 방법 | hooni | 2003.04.23 | 17058 |
174 | System/OS | [windows] 도스 사용 팁 | hooni | 2003.04.23 | 17893 |
173 | System/OS | [windows] 98/ME 속도 빠르게 튜닝(부팅,메모리,레지스터) | hooni | 2003.04.23 | 50526 |
172 | System/OS | [web] 웹서비스 취약점 자료.. (논문첨부) | hooni | 2003.04.23 | 18050 |
171 | System/OS | [virtualbox] VirtualBox에 Ubuntu 설치하기 | hooni | 2019.11.22 | 1055 |
170 | System/OS | [unix] 유닉스 csh에서 환경변수 등록 | hooni | 2003.04.23 | 11751 |
169 | System/OS | [unix] SUN Solaris 싱글모드.. ㅡ,.ㅡ; | hooni | 2003.04.23 | 12051 |
168 | System/OS | [unix] AIX쉘 초기 파일 (.cshrc) | hooni | 2013.04.23 | 10348 |
167 | System/OS | [switch] 시스코 카탈리스트(Cisco Catalyst) 기본 설정 | hooni | 2013.04.23 | 17567 |