2 # Copyright (C) 2011-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://www.cipherdyne.org
/fwknop
/download
16 PKG_MD5SUM
:=e2c49e9674888a028bd443a55c3aaa22
17 PKG_HASH
:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4
18 PKG_MAINTAINER
:=Jonathan Bennett
<JBennett@incomsystems.biz
>
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/fwknop
/Default
25 TITLE
:=FireWall KNock OPerator
26 URL
:=http
://www.cipherdyne.org
/fwknop
/
29 define Package
/fwknop
/Default
/description
30 Fwknop implements an authorization scheme known
as Single Packet Authorization
31 (SPA
) for Linux systems running iptables. This mechanism requires only a
32 single encrypted and non-replayed packet to communicate various pieces of
33 information including desired access through an iptables policy. The main
34 application of this program is to use iptables in a default-drop stance to
35 protect services such
as SSH with an additional layer of security in order to
36 make the exploitation of vulnerabilities
(both
0-day and unpatched code
) much
40 define Package
/fwknopd
41 $(call Package
/fwknop
/Default
)
46 DEPENDS
:=+iptables
+libfko
+!FWKNOPD_NFQ_CAPTURE
:libpcap
+FWKNOPD_NFQ_CAPTURE
:iptables-mod-nfqueue
+FWKNOP_GPG
:gnupg \
47 +FWKNOPD_NFQ_CAPTURE
:libnetfilter-queue
+FWKNOPD_NFQ_CAPTURE
:libnfnetlink
50 define Package
/fwknopd
/description
51 $(call Package
/fwknop
/Default
/description
)
52 This package contains the fwknop daemon.
55 define Package
/fwknopd
/conffiles
56 /etc
/fwknop
/access.conf
57 /etc
/fwknop
/fwknopd.conf
61 define Package
/fwknopd
/config
62 source
"$(SOURCE)/Config.in"
66 $(call Package
/fwknop
/Default
)
74 define Package
/fwknop
/description
75 $(call Package
/fwknop
/Default
/description
)
76 This package contains the fwknop client.
80 $(call Package
/fwknop
/Default
)
87 define Package
/libfko
/description
88 $(call Package
/fwknop
/Default
/description
)
89 This package contains the libfko shared library.
93 ifneq ($(CONFIG_FWKNOPD_GPG
),y
)
94 CONFIGURE_ARGS
+= --without-gpgme
97 ifeq ($(CONFIG_FWKNOPD_NFQ_CAPTURE
),y
)
98 CONFIGURE_ARGS
+= --enable-nfq-capture
102 --with-iptables
=/usr
/sbin
/iptables
104 define Build
/InstallDev
105 $(INSTALL_DIR
) $(1)/usr
/include
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fko.h
$(1)/usr
/include/
107 $(INSTALL_DIR
) $(1)/usr
/lib
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfko.
{a
,la
,so
*} $(1)/usr
/lib
/
111 define Package
/fwknopd
/install
112 $(INSTALL_DIR
) $(1)/etc
/config
113 $(INSTALL_CONF
) .
/files
/fwknopd
$(1)/etc
/config
/fwknopd
114 $(INSTALL_DIR
) $(1)/etc
/fwknop
115 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/fwknop
/{access
,fwknopd
}.conf \
117 $(INSTALL_DIR
) $(1)/etc
/init.d
118 $(INSTALL_BIN
) .
/files
/fwknopd.init
$(1)/etc
/init.d
/fwknopd
119 $(INSTALL_DIR
) $(1)/usr
/sbin
120 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/fwknopd
$(1)/usr
/sbin
/
123 define Package
/fwknop
/install
124 $(INSTALL_DIR
) $(1)/usr
/bin
125 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/fwknop
$(1)/usr
/bin
/
128 define Package
/libfko
/install
129 $(INSTALL_DIR
) $(1)/usr
/lib
130 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfko.so.
* $(1)/usr
/lib
/
133 $(eval
$(call BuildPackage
,fwknopd
))
134 $(eval
$(call BuildPackage
,fwknop
))
135 $(eval
$(call BuildPackage
,libfko
))