Views 1237 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

# 내 서버 설정 (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




?

List of Articles
No. Category Subject Author Date Views
» System/OS [linux] iptables 초간단 세팅 스크립트 hooni 2017.09.26 1237
153 System/OS [linux] man 명령어 뽀개기.. hooni 2003.04.23 8723
152 System/OS [linux] Masquerade 가상 ip분할기법 hooni 2003.04.23 47936
151 System/OS [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd hooni 2003.04.23 32450
150 System/OS [linux] Proftpd 설치 가이드 hooni 2003.04.23 13021
149 System/OS [linux] ProFTPD 타임아웃 설정 hooni 2003.04.23 12851
148 System/OS [linux] resolv.con 초기화 되는 문제 hooni 2014.04.05 4616
147 System/OS [linux] root 전환시 패스워드 없이 su 사용하기 hooni 2013.12.22 12685
146 System/OS [linux] root도 삭제하지 못하는 파일 속성 hooni 2003.04.23 12412
145 System/OS [linux] sendmail 설정/사용 hooni 2003.04.23 14570
144 System/OS [linux] split 명령어 hooni 2014.03.11 4303
143 System/OS [linux] SSH에 대한 기본 설명과 설치/설정 hooni 2013.04.23 10493
142 System/OS [linux] ssh에서 원격 파일 전송하기.. hooni 2013.04.23 14155
141 System/OS [linux] The Ultimate Wget Download Guide With 15 Awesome Examples hooni 2020.05.26 797
140 System/OS [linux] vi 편집기 간단한 명령과 환경설정 hooni 2003.04.23 11359
139 System/OS [linux] wget 명령 사용 예제 hooni 2020.05.26 1432
Board Pagination Prev 1 2 3 4 5 6 ... 13 Next
/ 13