亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問板塊 發(fā)新帖
查看: 3260 | 回復(fù): 3
打印 上一主題 下一主題

freebsd9.1 防火墻不生效問題求解 ipfw.rule [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2013-07-22 16:47 |只看該作者 |倒序?yàn)g覽

個(gè)人pc機(jī)器安裝freebsd9.0  服務(wù)器正常運(yùn)行 跑著wordpress博客 ,我添加一條指令
ipfw add 10001 deny all from 192.168.1.6 to any

ipfw show 顯示這條規(guī)則 ,防火墻正常運(yùn)行
本人用192.168.1.6這臺(tái)電腦還是可以訪問服務(wù)器,也可操作, 求指點(diǎn)




/etc/ipfw.rule文件內(nèi)容如下

#!/bin/sh
ipfw -q -f flush
IPF="ipfw -q add"
ip="192.168.1.251"
ipfw -q -f flush
pif="em0"
#loopback
$IPF 10 allow all from any to any via lo0
$IPF 15 allow all from $ip to any via $pif
$IPF 20 deny all from any to 127.0.0.0/8
$IPF 30 deny all from 127.0.0.0/8 to any
$IPF 40 deny tcp from any to any frag

#statefull
$IPF 50 check-state
$IPF 60 allow tcp from any to any established
$IPF 70 allow all from any to any out keep-state
#$IPF 80 allow icmp from 192.168.3.0/24 to any via $pif
# open port ftp (21,22), ssh (22), mail (25)

#http (80), dns (53) etc
$IPF 110 allow tcp from any to any 21 in
$IPF 120 allow tcp from any to any 21 out
$IPF 130 allow tcp from any to any 22 in
$IPF 140 allow tcp from any to any 22 out
$IPF 150 allow tcp from any to any 25 in
$IPF 160 allow tcp from any to any 25 out
$IPF 170 allow tcp from any to any 53 in
$IPF 185 allow tcp from any to any 53 out
$IPF 200 allow tcp from any to any 80 in setup limit src-addr 150
$IPF 210 allow tcp from any to any 80 out
$IPF 211 allow tcp from any to any 3306 in
$IPF 212 allow tcp from any to any 3306 out
$IPF 213 allow tcp from any to any 1186 in
$IPF 214 allow tcp from any to any 1186 out
$IPF 215 allow tcp from any to any 11211
$IPF 220 allow tcp from any to any 10000-65535 in
$IPF 221 allow tcp from any to any 10000-65535 out

$IPF 320 deny tcp from any to any 137 in via $pif
$IPF 321 deny tcp from any to any 138 in via $pif
$IPF 322 deny tcp from any to any 139 in via $pif
$IPF 323 deny tcp from any to any 81 in via $pif

$IPF 400 allow udp from $ip to any
$IPF 401 allow icmp from any to $ip
$IPF 402 allow icmp from $ip to any 8
$IPF 403 allow icmp from $ip to any 0
$IPF 404 allow icmp from $ip to any 11
$IPF 405 allow icmp from $ip to any 3

#$IPF 800 pipe 1 ip from 192.168.3.10 to any in
#$IPF 900 pipe 2 ip from any to 192.168.3.10 out
#ipfw pipe 1 config bw 200Kbit/s queue 150Kbit
#ipfw pipe 2 config bw 300Kbit/s queue 20

# deny and log everything
$IPF 500 deny log all from any to any


開機(jī)啟動(dòng)文件rc.conf 防火墻文件如下

firewall_enable="YES"
firewall_script="/etc/ipfw.rule"
firewall_quiet="NO"
#open ipfw function


論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2013-07-22 18:53 |只看該作者
ipfw list 貼完整的信息出來(lái)看下!直接貼配置看不出你系統(tǒng)實(shí)際生效的規(guī)則是什么樣子的!有可能是在你的10001 rule前面有其他的rule給pass了!

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2013-07-23 10:21 |只看該作者
回復(fù) 2# cyc_828

你好  這是我的 ipfw list顯示的規(guī)則

    root@192:/root # ipfw list
00010 allow ip from any to any via lo0
00015 allow ip from 192.168.1.251 to any via em0
00020 deny ip from any to 127.0.0.0/8
00030 deny ip from 127.0.0.0/8 to any
00040 deny tcp from any to any frag
00050 check-state
00060 allow tcp from any to any established
00070 allow ip from any to any out keep-state
00110 allow tcp from any to any dst-port 21 in
00120 allow tcp from any to any dst-port 21 out
00130 allow tcp from any to any dst-port 22 in
00140 allow tcp from any to any dst-port 22 out
00150 allow tcp from any to any dst-port 25 in
00160 allow tcp from any to any dst-port 25 out
00170 allow tcp from any to any dst-port 53 in
00185 allow tcp from any to any dst-port 53 out
00200 allow tcp from any to any dst-port 80 in setup limit src-addr 150
00210 allow tcp from any to any dst-port 80 out
00211 allow tcp from any to any dst-port 3306 in
00212 allow tcp from any to any dst-port 3306 out
00213 allow tcp from any to any dst-port 1186 in
00214 allow tcp from any to any dst-port 1186 out
00215 allow tcp from any to any dst-port 11211
00220 allow tcp from any to any dst-port 10000-65535 in
00221 allow tcp from any to any dst-port 10000-65535 out
00320 deny tcp from any to any dst-port 137 in via em0
00321 deny tcp from any to any dst-port 138 in via em0
00322 deny tcp from any to any dst-port 139 in via em0
00323 deny tcp from any to any dst-port 81 in via em0
00400 allow udp from 192.168.1.251 to any
00401 allow icmp from any to 192.168.1.251
00402 allow icmp from 192.168.1.251 to any dst-port 8
00403 allow icmp from 192.168.1.251 to any dst-port 0
00404 allow icmp from 192.168.1.251 to any dst-port 11
00405 allow icmp from 192.168.1.251 to any dst-port 3
00500 deny log logamount 10 ip from any to any
10001 deny ip from 192.168.1.6 to any
10001 deny ip from 192.168.1.6 to 192.168.1.251
10001 deny ip from 192.168.1.6 to 192.168.1.251
10001 deny ip from any to any
10001 deny ip from any to any
65535 deny ip from any to any

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2013-07-23 10:31 |只看該作者
回復(fù) 2# cyc_828


    一句驚醒啊 醍醐灌頂啊  
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP