Skip to content

Commit a4c6bc0

Browse files
committed
allow pf to actually start on first time
by giving it an empty config
1 parent 62f38c0 commit a4c6bc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bsdploy/fabfile_digitalocean.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22
from bsdploy.bootstrap_utils import BootstrapUtils
3-
from fabric.api import env, run, sudo
3+
from fabric.api import env, sudo
44
from time import sleep
55

66
# a plain, default fabfile for jailhosts on digital ocean
@@ -13,12 +13,15 @@ def bootstrap(**kwargs):
1313
"""Digital Oceans FreeBSD droplets are pretty much already pre-bootstrapped,
1414
including having python2.7 and sudo etc. pre-installed.
1515
the only thing we need to change is to allow root to login (without a password)
16+
enable pf and ensure it is running
1617
"""
1718
original_host = env.host_string
1819
env.host_string = 'freebsd@%s' % env.instance.uid
1920
sudo("""sysrc pf_enable=YES""")
2021
sudo("""sysrc -f /boot/loader.conf pfload=YES""")
2122
sudo('kldload pf', warn_only=True)
23+
sudo('''touch /etc/pf.conf''')
24+
sudo('''chmod 644 /etc/pf.conf''')
2225
sudo('service pf start')
2326
sudo("""echo 'PermitRootLogin without-password' > /etc/ssh/sshd_config""")
2427
sudo("""service sshd fastreload""")

0 commit comments

Comments
 (0)