System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
Views 1398 Comment 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
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
22 | System/OS | [windows] 종료, 재시작, 로그아웃 아이콘 만들기 | hooni | 2013.04.23 | 18197 |
21 | System/OS | [windows] 최근 열어본 문서목록 안나오게 하는 방법 | hooni | 2013.04.23 | 25562 |
20 | System/OS | [windows] 패스워드를 잊어먹었을때.. | hooni | 2003.04.23 | 17361 |
19 | System/OS | [펌] 마이크로서비스, 모노리포, SRE, ... 덮어놓고 구글 따라하면 안 되는 기술들 | hooni | 2020.10.15 | 1102 |
18 | System/OS | 개인적으로 쓰고 있는 bash_profile | hooni | 2015.01.16 | 984 |
17 | System/OS | 개인적으로 쓰고 있는 zshrc 파일 | hooni | 2022.02.25 | 998 |
16 | System/OS | 나중에 해봐야지.. libconv 설치.. ㅡ,.ㅡ; | hooni | 2013.04.23 | 19336 |
15 | System/OS | 네트워크 용어 정리 | hooni | 2022.11.20 | 1691 |
14 | System/OS | 네트워크별 MTU(최대 전송 단위) | hooni | 2013.04.23 | 17711 |
13 | System/OS | 라우팅 경로 결정 영향 요소 ㅋㅋ | hooni | 2013.04.23 | 15942 |
12 | System/OS | 맥 OS X 에서 스크린 화면 캡쳐 단축키 (Mac Print Screen) | hooni | 2015.07.21 | 2036 |
11 | System/OS | 맥북에서 MAC/윈도우 멀티부팅시 시간 설정 | hooni | 2013.04.23 | 29863 |