From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Sep 5 12:44:00 2004 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB06D16A4CE; Sun, 5 Sep 2004 12:44:00 +0000 (GMT) Received: from vsmtp2.tin.it (vsmtp2alice.tin.it [212.216.176.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id B160043D1F; Sun, 5 Sep 2004 12:43:59 +0000 (GMT) (envelope-from l.pizzira@virgilio.it) Received: from worklab (62.211.32.96) by vsmtp2.tin.it (7.0.027) id 41362EBD0009AF52; Sun, 5 Sep 2004 14:43:59 +0200 Date: Sun, 5 Sep 2004 14:44:01 +0200 From: Luigi Pizzirani To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Message-ID: <20040905144401.54115d39@worklab> In-Reply-To: <200409042100.i84L0eIG055485@freefall.freebsd.org> References: <200409042052.i84Kq0OH026143@www.freebsd.org> <200409042100.i84L0eIG055485@freefall.freebsd.org> X-Mailer: Sylpheed-Claws 0.9.12a (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: ports/71381: New port:: A tool that, installed on a gateway, permits clients to use it whatever IP they have X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2004 12:44:00 -0000 Finally the right shar file. I'm sorry for the two previous replies New port: A tool that, installed on a gateway, permits clients to use it whatever IP they have Confidential no Severity non-critical Priority medium Responsible freebsd-ports-bugs@FreeBSD.org State open Class update Submitter-Id current-users Arrival-Date Sat Sep 04 21:00:40 GMT 2004 Last-Modified Sun Sep 5 10:20:00 GMT 2004 Originator Luigi Pizzirani Release FreeBSD 5.3-BETA3 Environment FreeBSD worklab.sviatnet1.com 5.3-BETA3 FreeBSD 5.3-BETA3 #1: Sat Sep 4 10:47:56 CEST 2004 sviatoslav@worklab.sviatnet1.com:/usr/obj/usr/src/sys/WORKLAB i386 Description This is a tool that uses ARP poisoning to have a scenario like this: we have a LAN and we want offer connectivity to every- one coming here with his laptop for example. It could happen that our customer has his network parameters already configured to work correctly in his own LAN, but not working here. We can have then this scenario: Customer's host (10.0.0.2/8 and default gateway set to 10.0.0.1) Our LAN (192.168.0.0/24 with real gateway 192.168.0.254). All that we want is that our customer plugs his laptop and joins the internet without changing nothing of his network parameters. Here comes this tool installed in my real gw(192.168.0.254) It's a sort of sniffer, because it sniffs broadcast ARP requests for the gateway and answers that the gateway is itself In our example our customer's laptop sends this request: arp who-has 10.0.0.1 tell 10.0.0.2 Now our gateway does the following: 1) Sends back this reply to 10.0.0.2: arp reply 10.0.0.1 is-at his_mac_address 2)Create the alias 10.0.0.254 (ARP is not routable so we need one alias for each subnet that is not our one) 3)Sends itself an ARP reply to refresh his ARP cache It is different from proxy arp for two reasons: first it runs in user space, then in this case we can plug machines belonging to whatever subnet, while proxy arp is used in the case of only two different ones. 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: # # sasp # sasp/Makefile # sasp/pkg-descr # sasp/distinfo # sasp/pkg-plist # echo c - sasp mkdir -p sasp > /dev/null 2>&1 echo x - sasp/Makefile sed 's/^X//' >sasp/Makefile << 'END-of-sasp/Makefile' X# New ports collection makefile for: sasp X# Date created: 2 September 2004 X# Whom: sviat X# X# $FreeBSD$ X# X XPORTNAME= sasp XPORTVERSION= 0.1 XCATEGORIES= security XMASTER_SITES= http://magdala.altervista.org/sviat/ X XMAINTAINER= l.pizzira@virgilio.it XCOMMENT= A tool that permits to use a gateway whatever IP we have X XBUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet-devel X X.include END-of-sasp/Makefile echo x - sasp/pkg-descr sed 's/^X//' >sasp/pkg-descr << 'END-of-sasp/pkg-descr' XThis is a tool that uses ARP poisoning to have a scenario Xlike this: we have a LAN and we want offer connectivity to every- Xone coming here with his laptop for example. It could happen that Xour customer has his network parameters already configured to Xwork correctly in his own LAN, but not working here. We can have Xthen this scenario: XCustomer's host (10.0.0.2/8 and default gateway set to 10.0.0.1) XOur LAN (192.168.0.0/24 with real gateway 192.168.0.254). X XAll that we want is that our customer plugs his laptop and joins Xthe internet without changing nothing of his network parameters. XHere comes this tool installed in my real gw(192.168.0.254) It's Xa sort of sniffer, because it sniffs broadcast ARP requests for Xthe gateway and answers that the gateway is itself In our example Xour customer's laptop sends this request: arp who-has 10.0.0.1 Xtell 10.0.0.2 Now our gateway does the following: 1) Sends back Xthis reply to 10.0.0.2: arp reply 10.0.0.1 is-at his_mac_address X2)Create the alias 10.0.0.254 (ARP is not routable so we need one Xalias for each subnet that is not our one) 3)Sends itself an ARP Xreply to refresh his ARP cache. XIt is different from proxy arp for two reasons: first it runs in Xuser space, then in this case we can plug machines belonging to Xwhatever subnet, while proxy arp is used in the case of only two Xdifferent ones. END-of-sasp/pkg-descr echo x - sasp/distinfo sed 's/^X//' >sasp/distinfo << 'END-of-sasp/distinfo' XMD5 (sasp-0.1.tar.gz) = e9aa7b1dfb8be3255380a8f18a067bf8 XSIZE (sasp-0.1.tar.gz) = 3750 END-of-sasp/distinfo echo x - sasp/pkg-plist sed 's/^X//' >sasp/pkg-plist << 'END-of-sasp/pkg-plist' Xsbin/sasp END-of-sasp/pkg-plist exit