From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Sep 4 21:00:41 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43A5A16A4CE for ; Sat, 4 Sep 2004 21:00:41 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 280F143D1D for ; Sat, 4 Sep 2004 21:00:41 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i84L0fW6055560 for ; Sat, 4 Sep 2004 21:00:41 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i84L0fmV055538; Sat, 4 Sep 2004 21:00:41 GMT (envelope-from gnats) Resent-Date: Sat, 4 Sep 2004 21:00:41 GMT Resent-Message-Id: <200409042100.i84L0fmV055538@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, Luigi Pizzirani Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 869C216A4CE for ; Sat, 4 Sep 2004 20:52:00 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 728EF43D1D for ; Sat, 4 Sep 2004 20:52:00 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i84Kq0kh026144 for ; Sat, 4 Sep 2004 20:52:00 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i84Kq0OH026143; Sat, 4 Sep 2004 20:52:00 GMT (envelope-from nobody) Message-Id: <200409042052.i84Kq0OH026143@www.freebsd.org> Date: Sat, 4 Sep 2004 20:52:00 GMT From: Luigi Pizzirani To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: 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: Sat, 04 Sep 2004 21:00:41 -0000 >Number: 71381 >Category: ports >Synopsis: 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 >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Sep 04 21:00:40 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Luigi Pizzirani >Release: FreeBSD 5.3-BETA3 >Organization: >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. >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: # # sasp # sasp/README # sasp/Makefile # sasp/pkg-descr # sasp/pkg-message # sasp/distinfo # sasp/pkg-plist # echo c - sasp mkdir -p sasp > /dev/null 2>&1 echo x - sasp/README sed 's/^X//' >sasp/README << 'END-of-sasp/README' 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: X 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 X 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. X END-of-sasp/README 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= sviat@OpenBEER.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' XA tool that permits to use a gateway whatever network configurati Xon we have END-of-sasp/pkg-descr echo x - sasp/pkg-message sed 's/^X//' >sasp/pkg-message << 'END-of-sasp/pkg-message' XA tool that permits to use a gateway whatever IP we have END-of-sasp/pkg-message 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 >Release-Note: >Audit-Trail: >Unformatted: