emacs - Make IPython Notebook accept connections only from given address/subnet -


i'm running notebook server on remote machine , want somehow protect it. unfortunately cannot use password authentication (because if can't use ein, emacs package ipython notebooks).

the other obvious solution make ipython notebook accept connections local machine's ip, seems there no regular way ipython configs. maybe i'm missing something?

or maybe there way achieve goal?

update: here's bug posted ein tracker: https://github.com/millejoh/emacs-ipython-notebook/issues/57.

update2: millejoh (ein developer), ein should work password-protected notebooks, question not actual anymore. replies!

you can set port ipython port used ipython. , restrict access port local machine's ip.

to set port:

edit ipython_notebook_config.py file , insert or edit line:

c.notebookapp.port = 7777 

where change 7777 port of choice.

assuming remote machine in linux. can use iptables block access port except local machine:

iptables -i input \! --src 1.2.3.4 -m tcp -p tcp --dport 7777 -j drop  # if it's not 1.2.3.4, drop 

where change 1.2.3.4 local ip , 7777 port have ipython working on.

sources:

for ipython configs: docs

for blocking ips : stackexchange cyberciti


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -