廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 2741 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
pigpig5442
個人頭像
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x0 鮮花 x13
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[轉帖]一個 ipchains 的設定範例 ......
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.

:input ACCEPT
:forward ACCEPT
:output ACCEPT

# SMTP
-A input -p tcp -s 0/0 -d 0/0 25 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 25 -j ACCEPT

# POP3
-A input -p tcp -s 0/0 -d 0/0 110 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 110 -j ACCEPT

# FTP
-A input -p tcp -s 0/0 -d 0/0 12345 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 12345 -j ACCEPT

# SSH
-A input -p tcp -s 0/0 -d 0/0 22 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 22 -j ACCEPT

# Telnet
-A input -p tcp -s 0/0 -d 0/0 23 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 23 -j ACCEPT

# DNS
-A input -p tcp -s 0/0 -d 0/0 53 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 53 -j ACCEPT

# WWW
-A input -p tcp -s 0/0 -d 0/0 80 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 80 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 6085 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 6085 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 6086 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 6086 -j ACCEPT

# Samba
-A input -p tcp -s 0/0 -d 0/0 137 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 137 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 138 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 138 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 139 -y -j ACCEPT
-A input -p udp -s 0/0 -d 0/0 139 -j ACCEPT

# SNP
-A input -p tcp -s 0/0 -d 0/0 970 -y -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 971 -y -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 972 -y -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 973 -y -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 976 -y -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 977 -y -j ACCEPT

# Default Input
-A input -s 0/0 -d 0/0 -I lo -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 0:1023 -y -j REJECT
-A input -p tcp -s 0/0 -d 0/0 2049 -y -j REJECT
-A input -p udp -s 0/0 -d 0/0 0:1023 -j REJECT
-A input -p udp -s 0/0 -d 0/0 2049 -j REJECT
-A input -p tcp -s 0/0 -d 0/0 6000:6009 -y -j REJECT
-A input -p tcp -s 0/0 -d 0/0 7100 -y -j REJECT

# Default Input
#-A input -s 0/0 -d 0/0 -I lo -j ACCEPT
-A input -p udp -s 140.110.4.1 53 -d 0/0 -j ACCEPT
-A input -p udp -s 140.110.16.1 53 -d 0/0 -j ACCEPT
-A input -p udp -s 140.110.60.1 53 -d 0/0 -j ACCEPT
-A input -p udp -s 168.95.192.1 53 -d 0/0 -j ACCEPT
#-A input -p tcp -s 0/0 -d 0/0 -y -j REJECT
-A input -p udp -s 0/0 -d 0/0 -j REJECT

# BackDoor
-A input -p udp -s 0/0 -d 0/0 57000 -j REJECT
-A output -p udp -s 0/0 57000 -d 0/0 -j REJECT
-A input -p udp -s 0/0 -d 0/0 57036 -j REJECT
-A output -p udp -s 0/0 57036 -d 0/0 -j REJECT
-A input -p udp -s 0/0 -d 0/0 58126 -j REJECT
-A output -p udp -s 0/0 58126 -d 0/0 -j REJECT

# Default Output


[ 此文章被andyz在2005-05-18 20:04重新編輯 ]



獻花 x0 回到頂端 [樓 主] From:台灣數位聯合 | Posted:2005-03-23 01:50 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.020830 second(s),query:15 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言