0
votes

I'm running a IPython Notebook Server (1.10, IPython installation within a virtualenv) on a Cent OS 6.3 server. There is an Apache running on that server, too.

However, somehow my firewall seems to block the IPython Notebook server on port 9345, although my iptables -config looks like:

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 

When I disable my iptables-service, everything works fine.

I tried other ports like 81, 8888, using a specific IP in the notebook_server_config.py, disabled the apache-service, but nothing seems to work. Any ideas how to fix this or wether my iptables-config is wrong?

1
Using HTTPS Port 443 solved the issue so for, but it`s still not working with other ports - dorvak

1 Answers

0
votes

You must listen on all interfaces, as the command line help states.

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

Hope that helps.