System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 2696 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
204 | System/OS | Apache CORS 설정 1 | hooni | 2020.09.04 | 6134 |
203 | System/OS | asx미디어 정보 기록.. | hooni | 2003.04.23 | 22156 |
202 | System/OS |
Brave Browser for Debian, Ubuntu, Mint
![]() |
hooni | 2024.10.23 | 6952 |
201 | System/OS |
CentOS 6.5 USB 설치
6 ![]() |
hooni | 2013.12.18 | 39981 |
200 | System/OS | CentOS 에서 Cacti 설치하기 | hooni | 2015.01.02 | 3183 |
199 | System/OS |
Configure Postfix to Use Gmail SMTP on Ubuntu 18.04
![]() |
hooni | 2020.02.07 | 12192 |
198 | System/OS |
Enable Safari Hidden Debug Menu in Mac OS X
![]() |
hooni | 2017.02.07 | 7588 |
197 | System/OS |
Enable the Develop Menu in Safari
![]() |
hooni | 2017.02.07 | 4057 |
196 | System/OS |
How to Install and Use wget on Mac
![]() |
hooni | 2020.09.03 | 5584 |
195 | System/OS | How to Setup an Email Server on CentOS 7 | hooni | 2018.04.05 | 5912 |
194 | System/OS | HTTP 프로토콜 (브라우저와 웹서버 간의 통신) | hooni | 2003.04.23 | 50776 |
193 | System/OS |
HTTPS와 SSL 인증서
![]() |
hooni | 2014.03.11 | 8756 |