Hi all,

Here's a useful package for retaining network access to an OpenWrt
install behind a firewall. It requires one Internet-facing server
daemon running to forward a TCP connection to a connected client. If
anyone finds this useful, I'll add a UCI-ification patch.

Signed-off-by: David Cooper <d...@kupesoft.com>

---

Index: packages/net/apf/Makefile
===================================================================
--- packages/net/apf/Makefile   (revision 0)
+++ packages/net/apf/Makefile   (revision 0)
@@ -0,0 +1,95 @@
+#
+# Copyright (C) 2009 David Cooper <d...@kupesoft.com>
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=apf
+PKG_VERSION:=0.8.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://gray-world.net/projects/af
+PKG_MD5SUM:=4411785b05ec59e955152fe4e61705b1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/apf/Default
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Active Port Forwarding
+  URL:=http://www.gray-world.net/pr_af.shtml
+  DEPENDS:=+libopenssl +zlib
+endef
+
+define Package/apf/Default/description
+ Active port forwarder is a software tool for secure port
+ forwarding. It uses SSL to increase security of communication
+ between a server and a client. Originally, it was developed to
+ forward data point to point. However, the need for bypassing
+ firewalls in order to connect to internally located computers
+ influenced the further development of the project. AF is
+ dedicated for people, who don't have an external ip number
+ and want to make some services available across the net.
+endef
+
+define Package/apf-server
+  $(call Package/apf/Default)
+  TITLE+= Server Daemon
+endef
+
+define Package/apf-server/description
+$(call Package/apf/Default/description)
+ This packages includes the server executable.
+endef
+
+define Package/apf-client
+  $(call Package/apf/Default)
+  TITLE+= Client Daemon
+endef
+
+define Package/apf-client/description
+$(call Package/apf/Default/description)
+ This packages includes the client executabe.
+endef
+
+
+CONFIGURE_VARS += \
+       LIBS="-lcrypto -lssl" \
+       ac_cv_lib_pthread_pthread_create="no" \
+       ac_cv_lib_dl_dlopen="no"
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR) ; \
+               touch \
+                       configure.in \
+                       aclocal.m4 \
+                       Makefile.in \
+                       configure \
+       );
+       $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               LIBS="-lcrypto -lnsl -lz -lssl"
+endef
+
+define Package/apf-server/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/afserver $(1)/usr/bin/apf-server
+endef
+
+define Package/apf-client/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/afclient $(1)/usr/bin/apf-client
+endef
+
+$(eval $(call BuildPackage,apf-server))
+$(eval $(call BuildPackage,apf-client))
+
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to