-
Notifications
You must be signed in to change notification settings - Fork 0
/
opnsense-backup-to-nextcloud.html
18 lines (17 loc) · 17 KB
/
opnsense-backup-to-nextcloud.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html><html lang="de-ch"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Backup OPNsense to Nextcloud - Finecloud</title><meta name="description" content="What is OPNsense? OPNsense® is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform. OPNsense includes most of the features available in expensive commercial firewalls, and more in many cases. It brings the rich feature set of commercial offerings with the benefits…"><meta name="generator" content="Publii Open-Source CMS for Static Site"><link rel="stylesheet" href="https://www.finecloud.ch/media/plugins/syntaxHighlighter/prism-black.css"><link rel="canonical" href="https://www.finecloud.ch/opnsense-backup-to-nextcloud.html"><link rel="alternate" type="application/atom+xml" href="https://www.finecloud.ch/feed.xml"><link rel="alternate" type="application/json" href="https://www.finecloud.ch/feed.json"><meta property="og:title" content="Backup OPNsense to Nextcloud"><meta property="og:site_name" content="Finecloud"><meta property="og:description" content="What is OPNsense? OPNsense® is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform. OPNsense includes most of the features available in expensive commercial firewalls, and more in many cases. It brings the rich feature set of commercial offerings with the benefits…"><meta property="og:url" content="https://www.finecloud.ch/opnsense-backup-to-nextcloud.html"><meta property="og:type" content="article"><link rel="shortcut icon" href="https://www.finecloud.ch/media/website/finecloud.png" type="image/png"><link rel="stylesheet" href="https://www.finecloud.ch/assets/css/style.css?v=39da73365516a098a9b73b721fc970e2"><script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://www.finecloud.ch/opnsense-backup-to-nextcloud.html"},"headline":"Backup OPNsense to Nextcloud","datePublished":"2022-11-02T19:12","dateModified":"2022-11-03T09:49","description":"What is OPNsense? OPNsense® is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform. OPNsense includes most of the features available in expensive commercial firewalls, and more in many cases. It brings the rich feature set of commercial offerings with the benefits…","author":{"@type":"Person","name":"Finecloud","url":"https://www.finecloud.ch/authors/finecloud/"},"publisher":{"@type":"Organization","name":"Finecloud"}}</script><meta name="google-site-verification" content="seFY9U12uiEq5U3_MyZiX6XWzk0AVFl9zITr2ZKsytY"></head><body><div class="site-container"><header class="top" id="js-header"><a class="logo" href="https://www.finecloud.ch/">Finecloud</a><nav class="navbar js-navbar"><button class="navbar__toggle js-toggle" aria-label="Menu" aria-haspopup="true" aria-expanded="false"><span class="navbar__toggle-box"><span class="navbar__toggle-inner">Menu</span></span></button><ul class="navbar__menu"><li><a href="https://www.finecloud.ch/" target="_self">Blog</a></li><li><a href="https://www.finecloud.ch/tags/" target="_self">Tags</a></li></ul></nav><div class="search"><div class="search__overlay js-search-overlay"><div class="search__overlay-inner"><form action="https://www.finecloud.ch/search.html" class="search__form"><input class="search__input js-search-input" type="search" name="q" placeholder="search..." aria-label="search..." autofocus="autofocus"></form><button class="search__close js-search-close" aria-label="Close">Close</button></div></div><button class="search__btn js-search-btn" aria-label="Search"><svg role="presentation" focusable="false"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#search"/></svg></button></div></header><main><article class="post"><div class="hero"><figure class="hero__image hero__image--overlay"><img src="https://www.finecloud.ch/media/website/download.jpg" srcset="https://www.finecloud.ch/media/website/responsive/download-xs.jpg 300w, https://www.finecloud.ch/media/website/responsive/download-sm.jpg 480w, https://www.finecloud.ch/media/website/responsive/download-md.jpg 768w, https://www.finecloud.ch/media/website/responsive/download-lg.jpg 1024w, https://www.finecloud.ch/media/website/responsive/download-xl.jpg 1360w, https://www.finecloud.ch/media/website/responsive/download-2xl.jpg 1600w" sizes="100vw" loading="eager" alt=""></figure><header class="hero__content"><div class="wrapper"><div class="post__meta"><time datetime="2022-11-02T19:12">November 2, 2022</time></div><h1>Backup OPNsense to Nextcloud</h1></div></header></div><div class="wrapper post__entry"><div class="post__toc"><h3>Table of Contents</h3><ul><li><a href="#mcetoc_1ggu9idgo5i">What is OPNsense?</a></li><li><a href="#mcetoc_1ggu9idgo5j">Why OPNsense?</a></li><li><a href="#mcetoc_1ggu9idgo5k">Backup your OPNsense configuration to your Nextcloud</a><ul><li><a href="#mcetoc_1ggu9idgo5l">1. Create a new user</a></li><li><a href="#mcetoc_1ggu9idgo5m">2. Create an Access Token</a></li><li><a href="#mcetoc_1ggu9idgo5n">3. Install Nextcloud Backup Plugin</a></li><li><a href="#mcetoc_1ggu9idgo5o">4. Connect OPNsense with Nextcloud</a></li><li><a href="#mcetoc_1ggu9idgo5p">5. Verify the Configuration Upload</a></li></ul></li></ul></div><h2 id="mcetoc_1ggu9idgo5i">What is OPNsense?</h2><p><a class="reference external" href="https://opnsense.org">OPNsense®</a> is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform.</p><p>OPNsense includes most of the features available in expensive commercial firewalls, and more in many cases. It brings the rich feature set of commercial offerings with the benefits of open and verifiable sources.</p><h2 id="mcetoc_1ggu9idgo5j">Why OPNsense?</h2><p>The feature set of OPNsense includes high-end features such as forward caching proxy, traffic shaping, intrusion detection and easy OpenVPN client setup. The latest release is based on a recent FreeBSD for long-term support and uses a newly developed MVC-framework based on Phalcon. OPNsense’s focus on security brings unique features such as the option to use LibreSSL instead of OpenSSL (selectable in the GUI).<br><br>The robust and reliable update mechanism gives OPNsense the ability to provide important security updates in a timely fashion.</p><h2 id="mcetoc_1ggu9idgo5k">Backup your OPNsense configuration to your Nextcloud</h2><p>In OPNsense you can backup your configuration directly and automatically to Nextcloud, using the backup feature. Every backup will be encrypted with the same algorithm used in the manual backup so it’s quite easy to restore to a new installed machine.</p><p>After set-up, the backup feature will run a first backup of the OPNsense configuration file. Then, if the configuration is subsequently changed, a new backup will be run. Only one backup is run per day after configuration changes.</p><div id="step-create-a-new-user" class="section"><h3 id="mcetoc_1ggu9idgo5l">1. Create a new user<a class="headerlink" href="https://docs.opnsense.org/manual/how-tos/cloud_backup.html#step-create-a-new-user" title="Permalink to this headline"></a></h3><p>Click on the user icon top right and click “Users”. In the new page, enter an username and a password into the boxes and click create to create a new user.</p></div><div id="step-create-an-access-token" class="section"><h3 id="mcetoc_1ggu9idgo5m">2. Create an Access Token<a class="headerlink" href="https://docs.opnsense.org/manual/how-tos/cloud_backup.html#step-create-an-access-token" title="Permalink to this headline"></a></h3><figure class="post__image">Close the modal dialog and remove the default files. Then open the Settings menu (also in the menu top right). Switch to security and generate a App password. <img loading="lazy" src="https://www.finecloud.ch/media/posts/69/Screenshot-2022-11-03-at-09.19.23.png" alt="" width="931" height="933" sizes="100vw" srcset="https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.19.23-xs.png 300w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.19.23-sm.png 480w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.19.23-md.png 768w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.19.23-lg.png 1024w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.19.23-xl.png 1360w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.19.23-2xl.png 1600w"></figure><br><p>Copy and store the generated password.</p></div><div id="step-connect-opnsense-with-nextcloud" class="section"><h3 id="mcetoc_1ggu9idgo5n">3. Install Nextcloud Backup Plugin</h3><p>Go to <em><span class="menuselection">System ‣ Firmware ‣ Plugins</span></em> and install the <em>os-nextcloud-backup</em> plugin</p><figure class="post__image"><img loading="lazy" src="https://www.finecloud.ch/media/posts/69/Screenshot-2022-11-03-at-09.24.39.png" alt="" width="1915" height="537" sizes="100vw" srcset="https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.24.39-xs.png 300w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.24.39-sm.png 480w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.24.39-md.png 768w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.24.39-lg.png 1024w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.24.39-xl.png 1360w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.24.39-2xl.png 1600w"></figure><h3 id="mcetoc_1ggu9idgo5o">4. Connect OPNsense with Nextcloud<a class="headerlink" href="https://docs.opnsense.org/manual/how-tos/cloud_backup.html#step-connect-opnsense-with-nextcloud" title="Permalink to this headline"></a></h3><figure class="post__image"><img loading="lazy" src="https://www.finecloud.ch/media/posts/69/Screenshot-2022-11-03-at-09.32.01.png" alt="" width="727" height="432" sizes="100vw" srcset="https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.32.01-xs.png 300w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.32.01-sm.png 480w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.32.01-md.png 768w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.32.01-lg.png 1024w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.32.01-xl.png 1360w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.32.01-2xl.png 1600w"></figure><br><p>Scroll to the Nextcloud Section in <em><span class="menuselection">System ‣ Configuration ‣ Backups</span></em> and enter the following values:</p><div class="wy-table-responsive"><table class="docutils align-default"><colgroup><col><col></colgroup><tbody><tr class="row-odd"><td><p>Enable</p></td><td><p>checked</p></td></tr><tr class="row-even"><td><p>URL</p></td><td><p>Base URL of your Nextcloud installation like <a class="reference external" href="https://cloud.example.com">https://cloud.example.com</a></p></td></tr><tr class="row-odd"><td><p>User</p></td><td><p>your choosen username</p></td></tr><tr class="row-even"><td><p>Password</p></td><td><p>paste your app password from step 2</p></td></tr><tr><td><p>Encryption Passowrd</p></td><td><p>define a Password to encrypt the config file</p></td></tr><tr class="row-odd"><td><p>Backup Directory</p></td><td><p>a name consisting of alphanumeric characters (keep default)</p></td></tr></tbody></table></div></div><div id="step-verify-the-configuration-upload" class="section"><h3 id="mcetoc_1ggu9idgo5p">5. Verify the Configuration Upload<a class="headerlink" href="https://docs.opnsense.org/manual/how-tos/cloud_backup.html#step-verify-the-configuration-upload" title="Permalink to this headline"></a></h3><p>When everything worked, you will see the newly created directory after saving the settings:</p><figure class="post__image"><img loading="lazy" src="https://www.finecloud.ch/media/posts/69/Screenshot-2022-11-03-at-09.38.41.png" alt="" width="292" height="114" sizes="100vw" srcset="https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.38.41-xs.png 300w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.38.41-sm.png 480w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.38.41-md.png 768w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.38.41-lg.png 1024w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.38.41-xl.png 1360w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.38.41-2xl.png 1600w"></figure><figure class="post__image">If you open it, you will see at lease a single backed up configuration file: <img loading="lazy" src="https://www.finecloud.ch/media/posts/69/Screenshot-2022-11-03-at-09.39.22.png" alt="" width="819" height="351" sizes="100vw" srcset="https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.39.22-xs.png 300w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.39.22-sm.png 480w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.39.22-md.png 768w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.39.22-lg.png 1024w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.39.22-xl.png 1360w, https://www.finecloud.ch/media/posts/69/responsive/Screenshot-2022-11-03-at-09.39.22-2xl.png 1600w"></figure><br><p id="references" class="rubric"></p></div></div><footer class="wrapper post__footer"><p class="post__last-updated">This article was updated on November 3, 2022</p><ul class="post__tag"><li><a href="https://www.finecloud.ch/tags/backup/">backup</a></li><li><a href="https://www.finecloud.ch/tags/firewall/">firewall</a></li><li><a href="https://www.finecloud.ch/tags/linux/">linux</a></li><li><a href="https://www.finecloud.ch/tags/network/">network</a></li><li><a href="https://www.finecloud.ch/tags/nextcloud/">nextcloud</a></li><li><a href="https://www.finecloud.ch/tags/tools/">tools</a></li></ul><div class="post__share"></div></footer></article><nav class="post__nav"><div class="post__nav-inner"><div class="post__nav-prev"><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#arrow-prev"/></svg> <a href="https://www.finecloud.ch/maven-getting-started.html" class="post__nav-link" rel="prev"><span>Previous</span> Maven getting started</a></div><div class="post__nav-next"><a href="https://www.finecloud.ch/take-care-of-your-ssh-keys.html" class="post__nav-link" rel="next"><span>Next</span> Take care of your SSH identities </a><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#arrow-next"/></svg></div></div></nav><div class="post__related related"><div class="wrapper"><h2 class="h5 related__title">You should also read:</h2><article class="related__item"><div class="feed__meta"><time datetime="2022-10-13T07:42" class="feed__date">Oktober 13, 2022</time></div><h3 class="h1"><a href="https://www.finecloud.ch/threema-backup-to-nextcloud.html">Threema Safe backup to Nextcloud</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2022-07-08T15:47" class="feed__date">Juli 8, 2022</time></div><h3 class="h1"><a href="https://www.finecloud.ch/citrix-adc-backup-mit-ansible.html">Citrix ADC (NetScaler) Backup mit Ansible</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2022-06-17T06:44" class="feed__date">Juni 17, 2022</time></div><h3 class="h1"><a href="https://www.finecloud.ch/tabby.html">Tabby Config-Sync auf Nextcloud einrichten</a></h3></article></div></div></main><footer class="footer"><div class="footer__copyright"><p>Powered by Publii</p></div><button onclick="backToTopFunction()" id="backToTop" class="footer__bttop" aria-label="Back to top" title="Back to top"><svg><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#toparrow"/></svg></button></footer></div><script>window.publiiThemeMenuConfig = {
mobileMenuMode: 'sidebar',
animationSpeed: 300,
submenuWidth: 'auto',
doubleClickTime: 500,
mobileMenuExpandableSubmenus: true,
relatedContainerForOverlayMenuSelector: '.top',
};</script><script defer="defer" src="https://www.finecloud.ch/assets/js/scripts.min.js?v=6ca8b60e6534a3888de1205e82df8528"></script><script>var images = document.querySelectorAll('img[loading]');
for (var i = 0; i < images.length; i++) {
if (images[i].complete) {
images[i].classList.add('is-loaded');
} else {
images[i].addEventListener('load', function () {
this.classList.add('is-loaded');
}, false);
}
}</script><script defer="defer" src="https://www.finecloud.ch/media/plugins/syntaxHighlighter/prism.js"></script></body></html>