Contents

Views 1227 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
1089 System/OS 무료로 HTTPS 적용하기 (Let's Encrypt) file hooni 2017.10.28 1390
1088 Etc How to completely Uninstall Coda hooni 2017.10.24 2043
1087 Etc 영어. 불규칙 동사 정리 file hooni 2017.10.04 3470
» System/OS [linux] iptables 초간단 세팅 스크립트 hooni 2017.09.26 1227
1085 Develop [ios] VIN Scanner (VIN barcode) 스캐너 file hooni 2017.09.16 634
1084 System/OS [mac] Homebrew/rvm/cocoapod setting hooni 2017.07.29 987
1083 Etc 캘리포니아 운전면허 문제 file hooni 2017.07.22 956
1082 Develop [android] 안드로이드 앱 문서 샘플 - NCComix file hooni 2017.07.11 2092
1081 Develop [coding] 공부해야 하는거 ㅋㅋ secret hooni 2017.06.27 0
1080 Develop [coding] Find all anagrams in a string hooni 2017.06.27 1128
1079 Etc IT감사 기법 시험 file hooni 2017.06.14 1396
1078 Develop [android] SQLiteOpenHelper를 이용한 DBManager hooni 2017.06.14 2041
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 98 Next
/ 98