Install keras and tensorflow using Rstudio

Installing Keras and TensorFlow using install_keras() isn't required to use the Keras R package. You can do a custom installation of Keras (and desired backend) as described on the Keras website and the Keras R package will find and use that version.

Source

So you can circumvent this issue with the firewall using a custom installation. The R package keras will then find that installation automatically. See the linked source for more information on how to do a custom installation.

edit: btw, there is a similar question that has been answered here. That poster goes into changing the proxy settings to cicrumvent the firewall. I cannot mark this question as a duplicate due to active bounty.