Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 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 '14 at 3:36
up vote 2 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@,59840@ 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 After the replacement, the link address looks like 59839@,59840@

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

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

where the 59839@,59840@ 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


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.