Results 1 to 2 of 2
  1. #1
    Untanglit
    Join Date
    Jul 2020
    Posts
    22

    Default Cloudflare DNS and letsencrypt messy scripts

    I wanted to have untangle update and use letsencrypt and cloudflare DNS(i have a dynamic ip), i am sending down here some messy python3 scripts i got on untangle crontab and it works, some cleanup and some optimization would be ideal, but i dont have the patience or time to do it, fell free to use, change, distribute or share. If i have free time i will maybe answer questions here. I will not answer anything on github. I am not responsible for what and how you use this code, or what it may cause to your appliance.

    Maybe it may be useful for the untangle team too?

    Notes that may impact the scripts or not:



    uvm.conf is the on on /etc/apache2/sites-available/uvm.conf
    i added a extra rule on uvm.conf to redirect the root from the web application to https, example:
    http://untangle.xxx/ [will b redirected to https]
    http://untangle.xxx/a [will not be redirected]
    the reason for the redirect exception is because webpage errors and some other pages are still served by http on untangle
    Change mydomain.com with your untangle hostname/https certificate name




    cloudflare.py is on /root/custom/cloudflare.py
    lines 12,13,14,16 need to be updated with, CF email, cf apikey, cf zone name, and wan interface name respectively
    lines 79->82 have some examples of what you should add to keep IPs upto-date on cloudflare, at the way it currently is, it doesnt create records, it only keeps them up to date.




    my letsencrypt.py is on /etc/apache2/ssl/letsencrypt/letsencrypt.py
    It uses again cloudflare API, and proves ownership of the domain through TXT dns record.
    if you keep the script on the same path i do (/etc/apache2/ssl/letsencrypt/letsencrypt.py) changing the lines 17->22 should be enough for it to work.


    https://github.com/haroldLuiz/untangle_messy_scripts
    Last edited by harold.cardozo; 10-05-2020 at 07:53 AM.

  2. #2
    Untangle Ninja
    Join Date
    May 2008
    Posts
    1,288

    Default

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2