【发布时间】:2014-08-27 06:05:28
【问题描述】:
我在 Cent OS 6.3 服务器上运行 IPython Notebook Server(1.10,在 virtualenv 中安装 IPython)。该服务器上也运行着 Apache。
然而,不知何故,我的防火墙似乎阻止了端口 9345 上的 IPython Notebook 服务器,尽管我的 iptables -config 看起来像:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
18 1248 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT icmp -- any any anywhere anywhere
0 0 ACCEPT all -- lo any anywhere anywhere
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:http
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:https
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:9345
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:9345
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9345
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:81
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 13 packets, 1768 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:81
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9345
当我禁用我的 iptables 服务时,一切正常。
我尝试了其他端口,例如 81、8888,使用 notebook_server_config.py 中的特定 IP,禁用了 apache 服务,但似乎没有任何效果。任何想法如何解决这个问题或我的 iptables-config 是否错误?
【问题讨论】:
-
使用 HTTPS 端口 443 解决了这个问题,但它仍然无法使用其他端口
标签: python centos ipython iptables ipython-notebook