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

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

Chinaunix

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

rhce實(shí)驗(yàn)之使用iptables構(gòu)建一個(gè)防火墻 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2009-03-19 19:55 |只看該作者 |倒序?yàn)g覽
rhce實(shí)驗(yàn)之使用iptables構(gòu)建一個(gè)防火墻

實(shí)驗(yàn)環(huán)境說明:
兩臺(tái)linux,server4和server5,一臺(tái)windows xp。在server5上構(gòu)建防火墻策略,其他兩臺(tái)作為客戶端測(cè)試。
server4:192.168.1.14
server5:192.168.1.15
windows:192.168.1.156
server5上的配置如下:
首先刪除已經(jīng)存在的chains,重置所有chains上的默認(rèn)規(guī)則,刷新所有規(guī)則:
[root@server5 ~]# iptables -F;iptables -X
[root@server5 ~]# for chain in INPUT FORWARD OUTPUT;do iptables -P $chain ACCEPT;done;
[root@server5 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  
1.阻止所有從鄰近的主機(jī)(server4)進(jìn)來的連接:
[root@server5 ~]# iptables -A INPUT -s 192.168.1.14 -m state --state NEW -j DROP
server4上做通過ssh做測(cè)試:
[root@server4 ~]# ssh server5
ssh: connect to host server5 port 22: Connection timed out
這樣,server4上不能連接server5。
2.限制從鄰近的(server5)進(jìn)來的icmp echo-request(回應(yīng)請(qǐng)求)包:
[root@server5 ~]# iptables -A INPUT -s 192.168.1.156 -p icmp --icmp-type echo-request -m limit --limit 6/minute --limit-burst 3 -j ACCEPT
[root@server5 ~]# iptables -A INPUT -s 192.168.1.156 -p icmp --icmp-type echo-request -j DROP
windows上做ping測(cè)試:
C:\Documents and Settings\jacky.lee>ping server5
Pinging server5.rhel5.com [192.168.1.15] with 32 bytes of data:
Reply from 192.168.1.15: bytes=32 time
Ping statistics for 192.168.1.15:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
看,ping了三次,到第四次就丟包了吧。
server5上做測(cè)試:
[root@server5 ~]# ping xzxj
PING xzxj (192.168.1.156) 56(84) bytes of data.
.........
一直就這樣,從server5上ping不通windows主機(jī)!
紅色部分要是看不明白,請(qǐng)參考我的另一篇關(guān)于iptables的文檔:
http://blog.chinaunix.net/u1/36549/showart_373517.html


本文來自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u1/36549/showart_1869022.html
您需要登錄后才可以回帖 登錄 | 注冊(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ū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP