2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.zeroflux.org
/knock
/files
/
17 PKG_MD5SUM
:=ca09d61458974cff90a700aba6120891
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/knock
/Default
29 URL
:=http
://www.zeroflux.org
/cgi-bin
/cvstrac
/knock
/wiki
33 $(call Package
/knock
/Default
)
37 define Package
/knock
/description
39 It listens to
all traffic on an ethernet
(or PPP
) interface
,
40 looking for special
"knock" sequences of port-hits. A client
41 makes these port-hits by sending a TCP
(or UDP
) packet to a
42 port on the server. This port need not be open
-- since
43 knockd listens at the link-layer level
, it sees
all traffic
44 even if it
's destined for a closed port. When the server
45 detects a specific sequence of port-hits, it runs a command
46 defined in its configuration file. This can be used to open
47 up holes in a firewall for quick access.
48 This package contains the port-knocking client.
52 $(call Package/knock/Default)
56 define Package/knockd/description
58 It listens to all traffic on an ethernet (or PPP) interface,
59 looking for special "knock" sequences of port-hits. A client
60 makes these port-hits by sending a TCP (or UDP) packet to a
61 port on the server. This port need not be open -- since
62 knockd listens at the link-layer level, it sees all traffic
63 even if it's destined for a closed port. When the server
64 detects a specific sequence of port-hits
, it runs a command
65 defined in its configuration file. This can be used to open
66 up holes in a firewall for quick access.
67 This package contains the port-knocking server.
70 define Package
/knockd
/conffiles
74 define Build
/Configure
75 $(call Build
/Configure
/Default
, \
77 CFLAGS
="$$$$CFLAGS $$$$CPPFLAGS" \
78 ac_cv_lib_pcap_pcap_open_live
=yes \
83 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
84 DESTDIR
="$(PKG_INSTALL_DIR)" \
88 define Package
/knock
/install
89 $(INSTALL_DIR
) $(1)/usr
/bin
90 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/knock
$(1)/usr
/bin
/
93 define Package
/knockd
/install
94 $(INSTALL_DIR
) $(1)/etc
95 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/knockd.conf
$(1)/etc
/
96 $(INSTALL_DIR
) $(1)/usr
/sbin
97 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/knockd
$(1)/usr
/sbin
/
100 $(eval
$(call BuildPackage
,knock
))
101 $(eval
$(call BuildPackage
,knockd
))