From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 6 21:30:12 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53D0F16A404 for ; Tue, 6 Mar 2007 21:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 28C0D13C481 for ; Tue, 6 Mar 2007 21:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l26LUBTI003210 for ; Tue, 6 Mar 2007 21:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l26LUBPM003205; Tue, 6 Mar 2007 21:30:11 GMT (envelope-from gnats) Resent-Date: Tue, 6 Mar 2007 21:30:11 GMT Resent-Message-Id: <200703062130.l26LUBPM003205@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christian Ludwig Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 492FA16A402 for ; Tue, 6 Mar 2007 21:24:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 39B6213C494 for ; Tue, 6 Mar 2007 21:24:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l26LOb9A077374 for ; Tue, 6 Mar 2007 21:24:37 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l26LOavY077373; Tue, 6 Mar 2007 21:24:36 GMT (envelope-from nobody) Message-Id: <200703062124.l26LOavY077373@www.freebsd.org> Date: Tue, 6 Mar 2007 21:24:36 GMT From: Christian Ludwig To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/110011: New port: ftp/ftp-proxy a port of OpenBSD's ftp-proxy(8) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 21:30:12 -0000 >Number: 110011 >Category: ports >Synopsis: New port: ftp/ftp-proxy a port of OpenBSD's ftp-proxy(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 06 21:30:11 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Christian Ludwig >Release: 6.2-stable >Organization: >Environment: FreeBSD chrissicool.shacknet.nu 6.2-STABLE FreeBSD 6.2-STABLE #5: Thu Mar 1 18:44:55 CET 2007 root@chrissicool.shacknet.nu:/usr/obj/usr/src/sys/KERNEL i386 >Description: Please find attached the FreeBSD port of ftp-proxy(8) from OpenBSD 4.0. There is already an older version in the base system, which is from OpenBSD 3.7. This one was completely rewritten and now uses pf's anchor facility. As it depends on libevent, I for one was unable to patch the version in the base system without major changes. A website tracking versions can be found at http://www.chrissicool.net/projects/ftp-proxy/ >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ftp-proxy # ftp-proxy/Makefile # ftp-proxy/pkg-descr # ftp-proxy/distinfo # ftp-proxy/files # ftp-proxy/files/ftp-proxy.sh # ftp-proxy/pkg-message # echo c - ftp-proxy mkdir -p ftp-proxy > /dev/null 2>&1 echo x - ftp-proxy/Makefile sed 's/^X//' >ftp-proxy/Makefile << 'END-of-ftp-proxy/Makefile' X# New ports collection makefile for: ftp-proxy X# Date created: 4. March 2007 X# Whom: Christian Ludwig X# X# $FreeBSD$ X# X XPORTNAME= ftp-proxy XPORTVERSION= 4.0p0 XCATEGORIES= ftp XMASTER_SITES= http://www.chrissicool.net/projects/ftp-proxy/distfiles/ X XMAINTAINER= chrissicool@chrissicool.net XCOMMENT= A port of OpenBSD's ftp-proxy X XLIB_DEPENDS= event:${PORTSDIR}/devel/libevent X XMAN8= ftp-proxy.8 XMANCOMPRESSED= yes X XPLIST_FILES= sbin/ftp-proxy \ X etc/rc.d/ftp-proxy.sh X XCFLAGS+= -I${PREFIX}/include X X.include X X.if ${OSVERSION} < 502106 XIGNORE= is only for 5.3 and above X.endif X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/ftp-proxy ${PREFIX}/sbin X ${INSTALL_SCRIPT} ${FILESDIR}/ftp-proxy.sh ${PREFIX}/etc/rc.d X ${INSTALL_MAN} ${WRKSRC}/ftp-proxy.8.gz ${PREFIX}/man/man8 X X.include END-of-ftp-proxy/Makefile echo x - ftp-proxy/pkg-descr sed 's/^X//' >ftp-proxy/pkg-descr << 'END-of-ftp-proxy/pkg-descr' XA ftp proxy for firewalled connections, Xusing pf's anchors and rules. XThis is a port of the OpenBSD ftp-proxy. X XWWW: http://www.openbsd.org/ END-of-ftp-proxy/pkg-descr echo x - ftp-proxy/distinfo sed 's/^X//' >ftp-proxy/distinfo << 'END-of-ftp-proxy/distinfo' XMD5 (ftp-proxy-4.0p0.tar.gz) = 1defe7411ed13966910d1ec25784db86 XSHA256 (ftp-proxy-4.0p0.tar.gz) = cabd125a011d6548f40c72e29a254e71decde306f55ff5d037018cb33901867f XSIZE (ftp-proxy-4.0p0.tar.gz) = 13381 END-of-ftp-proxy/distinfo echo c - ftp-proxy/files mkdir -p ftp-proxy/files > /dev/null 2>&1 echo x - ftp-proxy/files/ftp-proxy.sh sed 's/^X//' >ftp-proxy/files/ftp-proxy.sh << 'END-of-ftp-proxy/files/ftp-proxy.sh' X#!/bin/sh X# X# $FreeBSD$ X# X X# PROVIDE: ftp-proxy X# REQUIRE: DAEMON X# X# NOTE for FreeBSD 5.0+: X# If you want this script to start with the base rc scripts X# move ftp-proxy.sh to /etc/rc.d/ftp-proxy X# Define these ftp-proxy_* variables in one of these files: X# /etc/rc.conf X# /etc/rc.conf.local X# /etc/rc.conf.d/ftp-proxy X# X# DO NOT CHANGE THESE DEFAULT VALUES HERE X# X Xftpproxy_enable=${ftp-proxy_enable:-"NO"} # Enable ftp-proxy Xftpproxy_flags=${ftp-proxy_flags:-""} # Flags to ftp-proxy program X#ftpproxy_program="%%PREFIX%%/sbin/ftp-proxy" # Location of ftp-proxy X X. %%RC_SUBR%% X Xname="ftp-proxy" Xrcvar=`set_rcvar` Xcommand="%%PREFIX%%/sbin/${name}" X Xload_rc_config $name X Xrun_rc_command "$1" END-of-ftp-proxy/files/ftp-proxy.sh echo x - ftp-proxy/pkg-message sed 's/^X//' >ftp-proxy/pkg-message << 'END-of-ftp-proxy/pkg-message' X=================================================================== XTo make use of the proxy, pf.conf(5) needs the following rules. All Xanchors are mandatory. Adjust the rules as needed. X XIn the NAT section: X X nat-anchor "ftp-proxy/*" X rdr-anchor "ftp-proxy/*" X rdr pass on $int_if proto tcp from $lan to any port 21 -> \ X 127.0.0.1 port 8021 X XIn the rule section: X X anchor "ftp-proxy/*" X pass out proto tcp from $proxy to any port 21 keep state X XAdd the following line to your /etc/rc.conf to enable the proxy on Xstartup: X X ftpproxy_enable="YES" X XPlease consult the man page ftp-proxy(8) for more information. X=================================================================== END-of-ftp-proxy/pkg-message exit >Release-Note: >Audit-Trail: >Unformatted: