System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1396 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
70 | System/OS | [linux] 간단한 vi편집기 사용 명령 | hooni | 2003.04.23 | 13528 |
69 | System/OS | [linux] 간단한 NAT 설정 script | hooni | 2003.04.23 | 12657 |
68 | System/OS | [linux] 간단한 find 명령어 설명(업데이트 해야 함) | hooni | 2013.04.23 | 9173 |
67 | System/OS | [linux] yum 업데이트 시 커널 제외하기 | hooni | 2014.09.11 | 1406 |
66 | System/OS | [linux] X환경 GNOME에서 KDE로 바꾸는 법.. | hooni | 2013.04.23 | 12414 |
65 | System/OS | [linux] Xwindow/Xmanager 사용 | hooni | 2003.04.23 | 13392 |
64 | System/OS | [linux] wget 명령 사용 예제 | hooni | 2020.05.26 | 1596 |
63 | System/OS | [linux] vi 편집기 간단한 명령과 환경설정 | hooni | 2003.04.23 | 11407 |
62 | System/OS | [linux] The Ultimate Wget Download Guide With 15 Awesome Examples | hooni | 2020.05.26 | 979 |
61 | System/OS | [linux] ssh에서 원격 파일 전송하기.. | hooni | 2013.04.23 | 14207 |
60 | System/OS | [linux] SSH에 대한 기본 설명과 설치/설정 | hooni | 2013.04.23 | 10655 |
59 | System/OS | [linux] split 명령어 | hooni | 2014.03.11 | 4378 |