added man pages
authorRalph Ronnquist <rrq@rrq.au>
Sun, 16 Feb 2025 06:06:14 +0000 (17:06 +1100)
committerRalph Ronnquist <rrq@rrq.au>
Sun, 16 Feb 2025 06:06:14 +0000 (17:06 +1100)
Makefile
nfblocker.5.adoc [new file with mode: 0644]
nfblocker.8.adoc [new file with mode: 0644]

index 6aabf719f24a1cb8738b80ee53107fc2b836842d..cd38ffb3c8a2e166a01e5219747cd32e124ef042 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,11 +5,14 @@ USERCOMMAND = nfblocker.sh
 
 .PHONY: install clean
 
-default: install
+default: bin/nfblocker nfblocker.5 nfblocker.8
 
 README.html: README.adoc
        asciidoctor -bhtml $<
 
+nfblocker.5 nfblocker.8: %: %.adoc
+       asciidoctor -bmanpage $<
+
 bin/nfblocker: $(wildcard src/*.c)
        # requires libnetfilter-queue-dev
        gcc -g -Wall -o $@ $^ -lnetfilter_queue
diff --git a/nfblocker.5.adoc b/nfblocker.5.adoc
new file mode 100644 (file)
index 0000000..0f6d20d
--- /dev/null
@@ -0,0 +1,37 @@
+= nfblocker(5)
+
+== NAME
+nfblocker - block list file format
+
+== SYNOPSIS
+
+/etc/nfblocker/acl/blocklist.acl
+
+ln -s ../acl/blocklist.acl /etc/nfblocker/blocked/
+
+== DESCRIPTION
+
+nfblocker uses one or more block list files which contain declaratios
+of the domains to block, one domain per line that starts with any
+number of whitespace characters followed by a period (".") before the
+domain to block. The blocking applies to the domain an all its sub
+domains.
+
+.Example of block list
+----
+Anything not starting with . is a comment
+leading whitespace is ignored
+  .bad.domain.com -- domain name up to whitespace is blocked
+blank lines are fine too
+
+.another.domain.to.block
+End of block list example.
+----
+
+== SEE ALSO
+
+nfblocker(8)
+
+== AUTHOR
+
+Ralph Ronnquist <rrq@rrq.au>
diff --git a/nfblocker.8.adoc b/nfblocker.8.adoc
new file mode 100644 (file)
index 0000000..9c795e8
--- /dev/null
@@ -0,0 +1,25 @@
+= nfblocker(8)
+
+== NAME
+
+nfblocker - Firewall agent blocking selected HTTP and HTTPS
+connections
+
+== SYNOPSIS
+
+nfblocker __blocklistfile__+
+
+== DESCRIPTION
+
+The nfblocker utility is a blacklist based network traffic filter for
+iptables via libnetfilter-queue. It applies to HTTP and SSL traffic
+for recognizing and dropping packets that are directed to blacklisted
+domain names.
+
+== SEE ALSO
+
+nfblocker(5)
+
+== AUTHOR
+
+Ralph Ronnquist <rrq@rrq.au>