【问题标题】:IPython Notebook Server on CentOS not accessibleCentOS 上的 IPython Notebook Server 无法访问
【发布时间】: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


【解决方案1】:

如命令行帮助所述,您必须监听所有接口。

ipython notebook --port=9345 --ip=*    # Listen on port 9345, all interfaces

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 2014-08-01
    • 2017-05-28
    • 2014-03-19
    • 1970-01-01
    • 2023-03-10
    • 1970-01-01
    • 2015-01-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多