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.
-
$\begingroup$ 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.) $\endgroup$– SzabolcsCommented Jul 9, 2014 at 3:30
-
$\begingroup$ Actually, I think that package is for using a remote main kernel, and it might not help with using remote subkernels. $\endgroup$– SzabolcsCommented Jul 9, 2014 at 3:36
1 Answer
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.
2.Start the listenning at the front end by execute anything, such as "$Version", which will prompt a popup window shows something like
3.Copy the link address part ([email protected],[email protected]
) 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 [email protected],[email protected]
.
4.Launch the kernel in the shell on the remote machine, and execute
$ParentLink = LinkConnect["[email protected],[email protected]", LinkProtocol->"TCPIP"]
where the [email protected],[email protected]
part is the part we just get above. Then hit "OK", if everything works correctly, you should get something like
Then you are connected to the remote kernel.