Contents

Views 1235 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
58 System/OS [linux] sendmail 설정/사용 hooni 2003.04.23 14570
57 System/OS [linux] root도 삭제하지 못하는 파일 속성 hooni 2003.04.23 12412
56 System/OS [linux] root 전환시 패스워드 없이 su 사용하기 hooni 2013.12.22 12683
55 System/OS [linux] resolv.con 초기화 되는 문제 hooni 2014.04.05 4614
54 System/OS [linux] ProFTPD 타임아웃 설정 hooni 2003.04.23 12851
53 System/OS [linux] Proftpd 설치 가이드 hooni 2003.04.23 13019
52 System/OS [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd hooni 2003.04.23 32450
51 System/OS [linux] Masquerade 가상 ip분할기법 hooni 2003.04.23 47936
50 System/OS [linux] man 명령어 뽀개기.. hooni 2003.04.23 8723
» System/OS [linux] iptables 초간단 세팅 스크립트 hooni 2017.09.26 1235
48 System/OS [linux] iptables 명령어 매뉴얼(options) hooni 2003.04.23 11333
47 System/OS [linux] ipfwadm를 이용한 패킷필터링(구버전) hooni 2003.04.23 13015
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 Next
/ 17