Yes, gufw is a GUI app.
On my Slackware boxes, I use an rc.firewall script that I downloaded a long time ago and configured to meet my needs. Sadly, it longer seems to be available on the web.
I hunted around a bit and found this
, which appears to be a script, rather than a GUI.
The Debian wiki lists several firewall frontends
, some of which appear to be command line based.
Sorry I missed the bit about it being a headless machine.