【求助】我好像被攻擊了!!! - 第2頁 - PCZONE 討論區

返回   PCZONE 討論區 > ▲ -- 電 腦 軟 體 討 論 區 > -- FreeBSD & Linux 討 論 版


PCZONE 討論區



通知

-- FreeBSD & Linux 討 論 版 因為本站採用 FreeBSD 作業系統,所以自己本身也多學了一些技巧,希望各位在這裡互相討論 Unix 作業系統及程式等相關問題。

進階會員

http://httpd.apache.org/docs/howto/auth.html#allowdeny


Allow and Deny
The Allow and Deny directives let you allow and deny access based on the host name, or host address, of the machine requesting a document. The directive goes hand-in-hand with these is the Order directive, which tells Apache in which order to apply the filters.

The usage of these directives is:

allow from address

where address is an IP address (or a partial IP address) or a fully qualified domain name (or a partial domain name); you may provide multiple addresses or domain names, if desired.

For example, if you have someone spamming your message board, and you want to keep them out, you could do the following:

deny from 11.22.33.44

Visitors coming from that address will not be able to see the content behind this directive. If, instead, you have a machine name, rather than an IP address, you can use that.

deny from hostname.example.com

And, if you'd like to block access from an entire domain, or even from an entire tld (top level domain, such as .com or .gov) you can specify just part of an address or domain name:

deny from 192.101.205
deny from exampleone.com exampletwo.com
deny from tld

Using Order will let you be sure that you are actually restricting things to the group that you want to let in, by combining a deny and an allow directive:

Order Deny,Allow
Deny from all
Allow from hostname.example.com

Listing just the allow directive would not do what you want, because it will let users from that host in, in addition to letting everyone in. What you want is to let in only users from that host.

回覆







 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。