System/OS
2017.09.26 01:52
[linux] iptables 초간단 세팅 스크립트
조회 수 1253 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
789 | PPT |
[doc] 정보보호학술대회 논문지 ㅋㅋ
![]() |
hooni | 2013.04.23 | 12182 |
788 | Develop | SVN 명령어 (SVN command) | hooni | 2014.02.28 | 12160 |
787 | Database | [mysql] DB->Text, Text->DB 변환 | hooni | 2003.04.23 | 12137 |
786 | Develop |
참고하고 지울 자료.. 집에서 바야지.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 12130 |
785 | Database |
[oracle] SQL문 실행 방법 3가지
![]() |
hooni | 2013.12.19 | 12129 |
784 | Develop | [ios] GCD 변수 사용 예제 | hooni | 2013.10.01 | 12121 |
783 | System/OS | [linux] 데스크탑환경(GNOME/KDE) 바꾸기.. | hooni | 2003.04.23 | 12114 |
782 | PPT |
[ppt] Magic URLs & Hidden Form Fields 에 대해.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 12095 |
781 | System/OS | [linux] /etc/fstab 설정 방법.. ㅋㅋ | hooni | 2013.04.23 | 12090 |
780 | Develop | [c++] 기초강좌 #03(함수의 매개변수 전달) | hooni | 2003.04.23 | 12090 |
779 | Develop |
[c++] 현승이가 준 P2P 프로그램 소스 ㅋㅋ
![]() |
hooni | 2013.04.23 | 12075 |
778 | System/OS | [linux] 쉘 스크립트 (Shell Script) | hooni | 2003.04.23 | 12068 |