【发布时间】:2013-04-11 05:12:12
【问题描述】:
使用以下规则,php 不能将redirect 生成另一个文件。它在到达header("Content-type: video/x-flv");
header("Location:" . $VIDEO);
或可能是我的 php 脚本上的 get_headers(); 时冻结。
我的 iptables:
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:22151
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:webcache
ACCEPT tcp -- anywhere anywhere tcp spt:webcache
ACCEPT tcp -- anywhere anywhere tcp spt:http
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
我试过的
iptables -A INPUT -p ICMP --icmp-type 8 -j ACCEPT
我删除 DROP all -- anywhere anywhere 后一切正常。
【问题讨论】:
-
您的规则都没有根据 HTTP 流量的内容进行过滤,所以我认为问题不是您认为的那样。
-
没关系,但在重定向时不需要发送
Content-type标头。客户端会忽略您发送的内容,而是转到Location标头中的页面。您是说这些 iptables 规则阻止客户端接收Location标头? -
@Barmar 是的。或者它可能停在
get_headers();
标签: linux security ubuntu iptables