System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1246 댓글 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
-
How to Setup an Email Server on CentOS 7
-
How to Test SMTP AUTH using Telnet
-
[python] DJI Tello 드론 코딩 (프로그래밍)
-
[mac] 맥에서 기본 실행 앱 변경하기
-
콘솔에서 패스워드 걸린 zip 압축하는 명령
-
What is difference between Get, Post, Put and Delete?
-
[php] Laravel Route에서 PC/Mobile 분기
-
Laravel 5 Failed opening required bootstrap/../vendor/autoload.php
-
[php][laravel] 라라벨 개발환경 세팅하기 (Mac, Window)
-
[php][laravel] 라라벨 프로젝트 생성 및 구조
-
[php][laravel] 초간단 MacOS에서 Laravel 개발 환경 구축
-
[mysql] MacOS에 MySQL 설치, 설정, 암호 재설정