-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syslog support #80
Comments
Hi Ralf, sorry for not following your contribution up. Yes, please rebase on master and post a comment on #65. We'll follow it there. |
Hi @schlatterbeck, could you share your openfortivpn compiling tutorial for openwrt, and prebuilt binary files for mips_24kc platform is more appreciated. |
@excelwang Out of curiosity, have you actually tried to compile? If so, did you encounter any problems while compiling? |
@schlatterbeck, Thanks for your reply. I have tried twice. The first time, I tried to cross-compile openfortivpn, but encountered compilation dependencies missing problem (afterward, I knew it was caused by the missing of cross-compiled openssl library). The second time, I tried to use a prebuilt openssl library shipped with lede/openwrt 17.01.4. But I gave it up at last, as I have no idea how to change openfortivpn's autogen.sh to use the cross compile environment. After all, I doubt if I could build a runnable openwrt version. Any advice for further step is very appreciated! |
I understand the whole difficulty here is to:
I've seldom messed with cross-compiling myself - and never with openfortivpn - so I won't be much help. For item 2 I would just suggest forgetting
Once you get there, I don't see why it wouldn't be possible to build openfortivpn for OpenWrt with minimal changes. I might help once you get there but I cannot help with prior items 1 and 2. |
@schlatterbeck. Finally I successfully cross compiled a working openfortivpn for openwrt. Mainly 2 steps:
|
Hello, Thanks in advance |
On Mon, Feb 26, 2018 at 07:25:47AM -0800, msfuentess wrote:
Hello,
I have compiled succesfully openfortivpn in Fedora and it works, but
now I'm trying unsuccessfuly to cross-compile it in my OpenWRT
building environment for an ar71xx (mips) Tp-Link router. Could any of
you elaborate how should I do it? It is the first package that I'm
trying to compile from external sources ....
I'm building OpenWRT completely from scratch (from source) and have
added my own "feed", that's what I've noted when I compiled openfortivpn
for OpenWRT:
Add the following line to the top-level 'feeds.conf' file:
src-link custom /path/to/your/own/openwrt-feed
Then:
./scripts/feeds install openfortivpn
make oldconfig # this will ask for openfortivpn, answer 'm' for module
make
# Update after first installation (on upstream change):
In openwrt build-directory:
./scripts/feeds uninstall openfortivpn
./scripts/feeds install openfortivpn
rm -f dl/openfortivpn*.tar.gz
make oldconfig # this will ask for openfortivpn, answer 'm' for module
make
# On OpenWRT router:
(on first install use opkg install instead of upgrade)
opkg update
opkg upgrade openfortivpn
I'm also attaching the Makefile I'm using and the openwrt.init script to
be placed in /etc/init.d on the router. in the directory given above
(.../openwrt-feed) there is a subdirectory named openfortivpn with the
attached Makefile and a subdirectory "files" that contains
openfortivpn.init (the init script attached).
Note that you'll have to edit Makefile
- The referenced git version is old, you'll have to insert the correct
version number
Let us know when you get this compiled.
Ralf
--
Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16
Open Source Consulting www: http://www.runtux.com
Reichergasse 131, A-3411 Weidling email: office@runtux.com
#
# Copyright (C) 2016 Ralf Schlatterbeck Open Source Consulting
# This Software is under the GNU General Public License, Version 3.
# See LICENSE of original package
#
include $(TOPDIR)/rules.mk
PKG_NAME:=openfortivpn
PKG_VERSION:=1.1.4
PKG_RELEASE:=0.2
PKG_MAINTAINER:=Ralf Schlatterbeck <rsc@runtux.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@github.com:adrienverge/openfortivpn.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=fda12d1eaf999c0f9a1724581b5774a45b675552
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_FIXUP:=autoreconf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/openfortivpn
SECTION:=net
CATEGORY:=Network
SUBMENU:=VPN
TITLE:=A VPN for Fortinet Servers
URL:=https://github.com/adrienverge/openfortivpn
DEPENDS:=+kmod-tun +libopenssl +ppp
endef
CONFIGURE_ARGS+= \
--prefix=/usr --sysconfdir=/etc
define Package/openfortivpn/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/openfortivpn
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openfortivpn/config $(1)/etc/openfortivpn/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/openfortivpn.init $(1)/etc/init.d/openfortivpn
endef
define Package/openfortivpn/conffiles
/etc/config/openfortivpn
endef
$(eval $(call BuildPackage,openfortivpn))
#!/bin/sh /etc/rc.common
START=90
STOP=10
USE_PROCD=1
start_service() {
procd_open_instance
procd_set_param command /usr/bin/openfortivpn
procd_close_instance
}
|
I finally got it compiled and working (except the ip routes that are not accepted by the client, but do work in fedora) This is the file structure that I used ./package/feeds/custom/openfortivpn and on the Makefile (thanks Ralf) I changed: Also on feeds.conf.default add: then proceed as normal: And you get your ipk file. You can also select openfortivpn in menuconfig and build your binary with openfortivpn inside. Thanks everyone |
I have submitted a pull-request (#65) for adding syslog-support for the log messages.
My use-case is to run openfortivpn non-interactively on a small openwrt-based router.
I'm using the patch in the pull-request successfully for several months now, so maybe you consider to accept the patch? Or do I need to add something to make you reconsider?
I can rebase the patch to the latest head commit if needed.
Ralf
The text was updated successfully, but these errors were encountered: