Cloud-init for Pfsense
-
I am trying to install the cloud-init package that comes available for FreeBSD, currently I am using version 12.2. I was able to successfully deploy an instance using openstack for FreeBSD with cloud-init template, however I am struggling to the same with pfsense. The steps I proceed are the following. I modify the pfsense to be able to download from FreeBSD repo and I am installing "pkg install net/cloud-init". Then I am modifying rc.conf.local and /etc/defaults/rc.conf to enable the cloud-init with (cloudinit_enable="YES"). However I am not able to deploy it successfully. I see when I run that the second disk is attacked but the config is not applied. When I run service -e I see that cloud-init service is active. Any tips how to configure it successfully?
-
That's not something I'd expect to work to be honest. pfSense doesn't use the FreeBSD rc init system so you might find it's just not starting as expected.
Steve
-
@stephenw10 Is there a working repository that offers cloud-init for pfsense, I saw that there were some instances in the past using very old versions but they are not being developed anymore. Or I should abandon this approach and look for alternatives. Thank you in advance for the feedback.
-
Nothing I'm aware of.
-
@stephenw10 Glad I found this forum as I`m battling the same problem currently. Is there a way to push a config upon installation, I looked into pfsense-api but that one requires you to have an IP, perhaps firewall to be stopped and also according to the limitations is not very trustworthy and has limited config options? Anything you can think of would be greatly appreciated.
Thanks in advance! -
There are a number of ways to restore an existing config during installation:
https://docs.netgate.com/pfsense/en/latest/backup/restore-during-install.htmlSteve
-
@yasa Instead of a prepackaged FreeBSD, couldn't you download and install pfSense ISO on the VM? I planned on doing this (just waiting to buy a bare metal Lenovo) with OpenStack on VMware ESXI. If your project is for your home/lab, alternatively, you could try TNSR since it's based on Linux and the cloud version (AWS & Azure) starts at $0.127/hr.