{"id":1873,"date":"2026-11-17T04:52:06","date_gmt":"2026-11-17T04:52:06","guid":{"rendered":"https:\/\/shijuvarghese.com\/?p=1873"},"modified":"2026-11-17T10:00:23","modified_gmt":"2026-11-17T10:00:23","slug":"bacula-lab-director-in-cgnat-client-on-internet","status":"publish","type":"post","link":"https:\/\/shijuvarghese.com\/?p=1873","title":{"rendered":"Bacula &#8211; Lab : Director in CGNAT. Client on internet"},"content":{"rendered":"\n<p>This document is a continuation of <a href=\"https:\/\/shijuvarghese.com\/?p=1846\" data-type=\"link\" data-id=\"https:\/\/shijuvarghese.com\/?p=1846\">basic backup configuration<\/a>. In this lab setup the Bacula Director and Storage sit in a private network connected to internet via CGNAT, and need to backup a server hosted on the internet.<\/p>\n\n\n\n<p>While the Bacula-Director will be able to access the Bacula-Client on the internet, the challenge will be for the Bacula-Client to access the Bacula-Storage which is hosted inside a CGNAT network. One of the recommended solution is to use <a href=\"http:\/\/pinggy.io\" data-type=\"link\" data-id=\"http:\/\/pinggy.io\">pinggy<\/a>. Refer the document <a href=\"https:\/\/shijuvarghese.com\/?p=1879\" data-type=\"link\" data-id=\"https:\/\/shijuvarghese.com\/?p=1879\">Pinggy &#8211; Expose Servers hosted within private network<\/a> to configure network.<\/p>\n\n\n\n<p>To enable the backup, we need to add the following blocks in bacula-dir which will be hosted inside the CGNAT network.<br>====== ==== ==== === =====<br><strong>Job {<\/strong><br>Name = &#8220;ShijuVargheseRemoteBackup&#8221;<br>JobDefs = &#8220;DefaultJob&#8221;<br>Type = Backup<br>Client = shijuvarghese-client-fd<br>FileSet = ShijuVarghese-FileSet<br>Schedule = &#8220;WeeklyCycle&#8221;<br>Messages = Standard<br>Storage = shijuVarghese-File-Storage<br><strong>}<\/strong><\/p>\n\n\n\n<p><strong>Client {<\/strong><br>Name = shijuvarghese-client-fd<br>Address = shijuvarghese.com<br>FDPort = 9102<br>Password = &#8220;thSecretKey&#8221;<br>File Retention = 30 days<br>Job Retention = 6 months<br>AutoPrune = yes<br>Catalog = MyCatalog<br><strong>}<\/strong><\/p>\n\n\n\n<p><strong>FileSet {<\/strong><br>Name = ShijuVarghese-FileSet<br>Include {<br>Options {<br>signature = SHA1<br>compression = GZIP<br>}<br>File = \/home\/shijuvarghese\/public_html\/test<br>}<br><strong>}<\/strong><\/p>\n\n\n\n<p><strong>Storage {<\/strong><br>Name = shijuVarghese-File-Storage<br>Address = xxxxxxxxxxxxx.run.pinggy-free.link    ### You get this from Pinggy<br>SDPort = 46847  #### You get this from Pinggy<br>Password = &#8220;@@SD_PASSWORD@@&#8221;<br>Device = FileStorage<br>Media Type = File<br><strong>}<\/strong><br>====== ==== ==== === =====<\/p>\n\n\n\n<p>Restart the Bacula Director.<\/p>\n\n\n\n<p>The Bacula-Client hosted in a server in the internet should have the below entries in bacula-fd-conf.<br>======= ===== ==== ===<br>Director {<br>Name = bacula-dir     ## This should match the name configured in Director<br>Password = &#8220;thSecretKey&#8221;    ##This should match the password mentioned in Director<br>}<\/p>\n\n\n\n<p>Director {<br>Name = bacula-mon<br>Password = &#8220;@@MON_FD_PASSWORD@@&#8221;<br>Monitor = yes<br>}<\/p>\n\n\n\n<p>FileDaemon {<br>Name = shijuvarghese-client-fd    ## This is the client name configured in Director<br>FDport = 9102<br>WorkingDirectory = \/var\/spool\/bacula<br>Pid Directory = \/var\/run<br>Maximum Concurrent Jobs = 20<br>Plugin Directory = \/usr\/lib64\/bacula<br>}<\/p>\n\n\n\n<p>Messages {<br>Name = Standard<br>director = bacula-dir = all, !skipped, !restored, !saved<br>append = \/var\/log\/bacula\/bacula-fd.log = all, saved, restored<br>}<br>==== ==== ==== ==== ==<\/p>\n\n\n\n<p>Restart the Bacula-Client<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>This document is a continuation of basic backup configuration. In this lab setup the Bacula Director and Storage sit in a private network connected to <a class=\"mh-excerpt-more\" href=\"https:\/\/shijuvarghese.com\/?p=1873\" title=\"Bacula &#8211; Lab : Director in CGNAT. Client on internet\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":1852,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup"],"_links":{"self":[{"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/1873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1873"}],"version-history":[{"count":11,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/1873\/revisions"}],"predecessor-version":[{"id":1886,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/1873\/revisions\/1886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/media\/1852"}],"wp:attachment":[{"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}