DHCP設定保留、封鎖IP位址、綁定MAC、自訂403、404訊息

2015-07-13_160530

DHCP設定保留

# Always allocate the host with ethernet address 11:22:33:44:55:66
# The IP address 192.168.0.60
#dhcp-host=11:22:33:44:55:66,192.168.0.60

已下是本校監視器DHCP保留設定(5-8設定保留)
dhcp-host=00:50:56:09:82:32,no_name,192.168.3.5,infinite
dhcp-host=00:50:56:0F:44:00,no_name,192.168.3.6,infinite
dhcp-host=00:50:56:0C:2D:19,no_name,192.168.3.7,infinite
dhcp-host=00:50:56:12:4A:00,no_name,192.168.3.8,infinite

====================

設定apache conf封鎖特定IP位址
Options FollowSymLinks
AllowOverride None
allow from all
Satisfy all
Order Allow,Deny
deny from IP1
deny from IP2

====================

自訂403權限不足訊息,以避免洩漏伺服器版本等訊息
修改
\etc\httpd\conf.dwelcome.conf
將 ErrorDocument 403 整行修改為
ErrorDocument 403 “<div align=center>403 Forbidden. You don’t have permission to access.</div>"

自訂404指不到網頁訊息\
修改
\etc\httpd\conf\httpd.conf
#ErrorDocument 404 /missing.html

#ErrorDocument 404 “/cgi-bin/missing_handler.pl"
改為
ErrorDocument 404 /err/
ps: /err/ 為自訂的網頁

改完後,重新啟動apache
service httpd restart

發表留言