Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

How to use remote kernels inside a home router? My router has the demilitarized zone (DMZ) feature, which can expose my computer to the internet, and should be able to work, but I can't figure out how to setup the connection command in Mathematica to make it work.

share|improve this question
    
Try Remote Kernel Strategies by sakra. It uses SSH forwarding so you can be behind a firewall. It simplifies the task. Good luck! (Doing these things is always painful for me and I never get it right the first time.) –  Szabolcs Jul 9 at 3:30
    
Actually, I think that package is for using a remote main kernel, and it might not help with using remote subkernels. –  Szabolcs Jul 9 at 3:36

1 Answer 1

up vote 0 down vote accepted

The setup is simple, the only thing is to change the ip address to the ip address of the router. Here is the step by step setup:

1.Setup the DMZ feature of the router, and set the address to my laptop address inside the router, on which I will use the frontend.

enter image description here

2.Start the listenning at the front end by execute anything, such as "$Version", which will prompt a popup window shows something like

enter image description here

3.Copy the link address part (59839@192.168.0.106,59840@192.168.0.106) to some editor, and replace the ip address part by the router ip address. The router ip address can be looked up easily from googling something like "my ip address". My router's ip address is 174.64.12.123. After the replacement, the link address looks like 59839@174.64.12.123,59840@174.64.12.123.

4.Launch the kernel in the shell on the remote machine, and execute

$ParentLink = LinkConnect["59839@174.64.12.123,59840@174.64.12.123", LinkProtocol->"TCPIP"]

where the 59839@174.64.12.123,59840@174.64.12.123 part is the part we just get above. Then hit "OK", if everything works correctly, you should get something like

enter image description here

Then you are connected to the remote kernel.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.