Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. 1. Prepare the router
  2.  
  3. 1. Use portfw to forward port 80 and 445 to the ip of the computer where you have certbot installed
  4.  
  5. 1. Enable Secure Shell from Services tab
  6.  
  7. 1. Enable JFFS2 Support form Administration tab
  8.  
  9. 1. Create the certificate
  10.  
  11. 1. Install certbot
  12. `brew install certbot`
  13.  
  14. 1. Go to a folder where you will configure certbot
  15.  
  16. 1. Execute certbot to create the certificate
  17.  
  18. `certbot certonly --config-dir . --logs-dir . --work-dir .`
  19.  
  20. When promted select `Spin up a temporary webserver (standalone)`
  21.  
  22. 1. Go to `./live/[your.domain]`
  23.  
  24. 1. Create rsa key from private key
  25.  
  26. `openssl rsa -in privkey.pem -out key.pem`
  27.  
  28. 1. ssh into the router
  29.  
  30. 1. cd to jffs
  31.  
  32. `cd /jffs`
  33.  
  34. 1. create startup folder
  35.  
  36. `mkdir startup`
  37.  
  38. 1. create the script (`binds_on_mount.sh`) that binds certificate files and make it executable
  39.  
  40. `chmod +x binds_on_mount.sh`
  41.  
  42. 1. create etc folder in jffs and cd in it
  43.  
  44. `mkdir /jffs/etc && cd /jffs/etc`
  45.  
  46. 1. create the certificate files from local certbot files
  47.  
  48. 1. paste contents of `key.pem`, `cert.pem` and `privkey.pem` into their respective file in `/jffs/etc`
  49.  
  50. 1. test by executing the script
  51.  
  52. 1. Execute the script on startup
  53.  
  54. 1. save this command as `Startup` in Administration > Commands
  55.  
  56. `cd /jffs/startup && ./binds_on_mount.sh > ./log`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement