dmuth / chef-101-introduction-to-chef

Sample Chef cookbook and recipe that I created for a blog post on Chef
Other
8 stars 3 forks source link

mac-os-x-ipfw - Didn't work for me on OS X Mavericks #1

Open funroll opened 10 years ago

funroll commented 10 years ago

See https://github.com/basecamp/pow/pull/432.

This command made it start working, but will go away on reboot: sudo sysctl net.inet.ip.fw.enable=1

Was going to send a PR, but I'm not sure the best way to fix it. You could add it in cookbooks/mac-os-x-ipfw/recipes/default.rb where you currently have this code:

execute "ipfw" do
        command "launchctl load -w /Library/LaunchDaemons/org.dmuth.ipfw.plist"
end

But that wouldn't stay past a reboot.

I found Apple's docs on launch daemons, but I couldn't see a way to run one process first, then run a second one that will stay running persistently.

You could wrap it in shell, but I'm not sure if there's a better way to handle it.

In any case, thanks for this recipe. If you haven't seen pow.cx, it's an interesting-looking tool. Not sure if it works with externally facing subdomains, or just .local ones.

I think this issue would be good to resolve, because I was banging my head against it for some time before I found sudo sysctl net.inet.ip.fw.enable=1.

Best, Peter

dmuth commented 10 years ago

Ooh, that's a tough one. Since I don't run Mavericks on my desktop and I no longer actively work with Chef, I'm not sure if I'll be able to address this one anytime soon. :-(