포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.

모든 포트를 막고,

 

ssh, ftp, www만 ok하는 스크립트...

 

#!/bin/sh


IPTABLES=/sbin/iptables

#port forward enable
echo "1" > /proc/sys/net/ipv4/ip_forward

$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F FORWARD

# ssh
$IPTABLES -A INPUT -i eth1 -p tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -i eth1 -p udp --dport 22 -j ACCEPT

# ftp
$IPTABLES -A INPUT -i eth1 -p tcp --dport 21 -j ACCEPT
$IPTABLES -A INPUT -i eth1 -p tcp --dport 20 -j ACCEPT

# www
$IPTABLES -A INPUT -i eth1 -p tcp --dport 80 -j ACCEPT

$IPTABLES -A INPUT -i eth1 -p tcp --dport 1:1024 -j DROP
$IPTABLES -A INPUT -i eth1 -p udp --dport 1:1024 -j DROP
$IPTABLES -A INPUT -i eth1 -p icmp -j DROP

 
List of Articles
번호 제목 글쓴이 날짜 조회 수sort

간단한 리눅스 firewall script

The GNU Make - How to Using Make file

CVS 디렉터리 날리는 방법

POSIX Serial Programming Guide file

C Library ABI for the ARM®Architecture file

micro second to jiffies 변환

The GNU Binary Utilities - How to Using binutils file

wxWidget mysql direct access file

Linux 101 Hacks file [1]

framebuffer capture하기 [1]

grep을 이용한 검색 script ==> gref

dos2unix source & site file

펌웨어 프로그래밍 팁 - gotoxy()

응용프로그램 컴파일 시 "config.h"가 없다고 나오는 경우 [1]

우분투 리눅스 8.10 업데이트 서버 변경 방법

유용한 ARM 어셈블리 분기 명령어 시리즈 #2

limxml2 라이브러리를 이용해서 어트리뷰트 값을 가져오는 방법

펌웨어 프로그래밍 팁 - atox() 함수 구현

ARM 7 강좌를 다른 분이 편집한 자료 같네요. file [2]

VirtualBox 설치 및 환경 설정 가이드 file

사용자 로그인