2 %define _bindir /usr/bin
3 %define _sbindir /usr/sbin
4 %define _includedir /usr/include
6 %define _libdir /usr/lib64
8 %define _libdir /usr/lib
10 %define _sysconfdir /etc
11 %define _localstatedir /var
12 %define _infodir /usr/share/info
13 %define _mandir /usr/share/man
19 Summary: Firewall Knock Operator client. An implementation of Single Packet Authorization.
21 Group: Applications/Internet
23 URL: http://www.cipherdyne.org/fwknop/
24 Source0: fwknop-%{version}.tar.gz
25 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
27 BuildRequires: gpg, gpgme-devel, libpcap-devel, gdbm-devel, iptables
29 Requires: libfko, iptables
34 Summary: The fwknop library
35 Group: Development/Libraries
38 %package -n libfko-devel
40 Summary: The fwknop library header and API docs
41 Group: Development/Libraries
45 Summary: The Firewall Knock Operator server. An implementation of Single Packet Authorization.
46 Group: System Environment/Daemons
47 Requires: libfko, libpcap, gdbm, iptables
51 Fwknop implements an authorization scheme known as Single Packet Authorization
52 (SPA) for Linux systems running iptables. This mechanism requires only a
53 single encrypted and non-replayed packet to communicate various pieces of
54 information including desired access through an iptables policy. The main
55 application of this program is to use iptables in a default-drop stance to
56 protect services such as SSH with an additional layer of security in order
57 to make the exploitation of vulnerabilities (both 0-day and unpatched code)
60 %description -n libfko
61 The Firewall Knock Operator library, libfko, provides the Single Packet
62 Authorization implementation and API for the other fwknop components.
64 %description -n libfko-devel
65 This is the libfko development header and API documentation.
68 The Firewall Knock Operator server component for the FireWall Knock Operator,
69 and is responsible for monitoring Single Packet Authorization (SPA) packets
70 that are generated by fwknop clients, modifying a firewall or acl policy to
71 allow the desired access after decrypting a valid SPA packet, and removing
72 access after a configurable timeout.
81 --sysconfdir=%{_sysconfdir} \
82 --localstatedir=%{_localstatedir} \
89 rm -rf $RPM_BUILD_ROOT
90 make install DESTDIR=$RPM_BUILD_ROOT
91 install -D ./extras/fwknop.init.redhat ${RPM_BUILD_ROOT}/etc/rc.d/init.d/fwknopd
93 [ -d "${RPM_BUILD_ROOT}/usr/share/info" ] \
94 || mkdir -p ${RPM_BUILD_ROOT}/usr/share/info
95 [ -f "${RPM_BUILD_ROOT}/usr/share/info/dir" ] \
96 || touch ${RPM_BUILD_ROOT}/usr/share/info/dir
99 rm -rf $RPM_BUILD_ROOT
101 %post -n libfko-devel
103 /sbin/install-info %{_infodir}/libfko.info* %{_infodir}/dir
105 %post -n fwknop-server
106 /sbin/chkconfig --add fwknopd
107 /sbin/chkconfig fwknopd off
109 %preun -n fwknop-server
110 /sbin/chkconfig --del fwknopd
112 %preun -n libfko-devel
113 if [ "$1" = 0 ]; then
114 /sbin/install-info --delete %{_infodir}/libfko.info* %{_infodir}/dir
121 %defattr(-,root,root,-)
122 %attr(0755,root,root) %{_bindir}/fwknop
123 %attr(0644,root,root) %{_mandir}/man8/fwknop.8*
124 %exclude %{_infodir}/dir
127 %defattr(-,root,root,-)
128 %attr(0644,root,root) %{_libdir}/libfko.*
130 %files -n libfko-devel
131 %defattr(-,root,root,-)
132 %attr(0644,root,root) %{_includedir}/fko.h
133 %attr(0644,root,root) %{_infodir}/libfko.info*
136 %defattr(-,root,root,-)
137 %attr(0755,root,root) %{_sbindir}/fwknopd
138 %attr(0755,root,root) /etc/rc.d/init.d/fwknopd
139 %attr(0644,root,root) %{_mandir}/man8/fwknopd.8*
140 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/fwknop/fwknopd.conf
141 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/fwknop/access.conf
144 * Thu Jul 15 2010 Damien Stuart <dstuart@dstuart.org>
145 - Fixed some misplaced depenencies (moved gpgpme from server to libfko).
147 * Wed Jul 7 2010 Damien Stuart <dstuart@dstuart.org>
148 - Made the post and preun steps specific to libfko-devel.
150 * Tue Jul 6 2010 Damien Stuart <dstuart@dstuart.org>
151 - Initial RPMification.