iptables 如何擋 ping 不到 ip 的網站? - Linux

Bennie avatar
By Bennie
at 2009-09-10T16:50

Table of Contents

ping 不到 IP 是因為他不回應你的 ICMP

實際上,瀏覽器仍是用該 IP 去存取該 Web

瀏覽器在連線前,會向 DNS Server 查詢該 domain name 所對應的 ip

你可以用 nslookup 來查詢

並且將所有跟該 domain name 對應的 ip 給封起來

這樣就能達到你要的目的了

※ 引述《sunkill (風樹)》之銘言:
: 如果一個網站
: 只有 domain name
: ping 不到 ip
: 要怎麼用 iptables 阻擋?
: iptables -A FORWARD -d ip -j DROP
: 填 domain name 會找不到
: 還是說要開 dns 53 port 才能夠?
: 感謝

--
Tags: Linux

All Comments

Genevieve avatar
By Genevieve
at 2009-09-14T09:04
然後看到這篇,我發現arch linux下沒有nslookup
Victoria avatar
By Victoria
at 2009-09-17T05:32
以前用ubuntu都有,arch真是不可思議的"乾淨"
Regina avatar
By Regina
at 2009-09-21T22:58
nslookup 應該是在 bind-utils 之類的 package 裡的吧
Irma avatar
By Irma
at 2009-09-23T06:00
> pkgfile nslookup; ==> core/dnsutils
Bennie avatar
By Bennie
at 2009-09-26T09:09
成功了 感謝

dd

Mary avatar
By Mary
at 2009-09-10T16:38
我想原 po 是想換大硬碟,j大的方法可以用 我給個建議,小修改一些,順便附上 grub 安裝 ※ 引述《jlovet (打不贏怪兵器不好)》之銘言: : ※ 引述《huggie (huggie)》之銘言: : : 我想把 root partition 換到新的硬碟上 : : 新的比舊的大 (30GB - ...

iptables 如何擋 ping 不到 ip 的網站?

Olivia avatar
By Olivia
at 2009-09-10T16:37
如果一個網站 只有 domain name ping 不到 ip 要怎麼用 iptables 阻擋? iptables -A FORWARD -d ip -j DROP 填 domain name 會找不到 還是說要開 dns 53 port 才能夠? 感謝 -- my s ...

grub和mbr問題

Margaret avatar
By Margaret
at 2009-09-10T16:24
用 Live CD 開機(ubuntu安裝光碟也行) 確定 ubuntu hd /boot/grub/menu.lst 設定正確 andgt;grub andgt;root (hd1,0) andgt;setup (hd0) andgt;quit 試試看吧 ※ 引述《moneycat2128 ...

Logwatch出現pam(sshd)error

Bennie avatar
By Bennie
at 2009-09-10T08:54
pam_succeed_if(sshd:auth): error retrieving information about user chaya : 1 time(s) pam_succeed_if(sshd:auth): error retrieving information about user ca ...

Centos Compile Vmware server 2.0的問題

Victoria avatar
By Victoria
at 2009-09-10T08:39
我有安裝kernel-header 就是使用vmware-config.pl的時候出現的錯誤 - ...