Date: Fri, 8 Apr 2005 08:46:02 GMT From: Luigi Pizzirani <sviat@opengeeks.it> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/79676: NEW PORT: A tool that, installed on a gateway, permits clients to use it whatever IP they have (now I have a working master site) Message-ID: <200504080846.j388k20J086204@www.freebsd.org> Resent-Message-ID: <200504080850.j388o5qw073110@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 79676 >Category: ports >Synopsis: NEW PORT: A tool that, installed on a gateway, permits clients to use it whatever IP they have (now I have a working master site) >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: Fri Apr 08 08:50:05 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Luigi Pizzirani >Release: FreeBSD 5.4-STABLE >Organization: >Environment: FreeBSD sviat.sviatnet1.com 5.4-STABLE FreeBSD 5.4-STABLE #26: Mon Apr 4 18:07:49 CEST 2005 sviatoslav@sviat.sviatnet1.com:/usr/obj/usr/src/sys/SVIAT 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-0.1 # sasp-0.1/pkg-plist # sasp-0.1/pkg-message # sasp-0.1/pkg-descr # sasp-0.1/distinfo # sasp-0.1/Makefile # echo c - sasp-0.1 mkdir -p sasp-0.1 > /dev/null 2>&1 echo x - sasp-0.1/pkg-plist sed 's/^X//' >sasp-0.1/pkg-plist << 'END-of-sasp-0.1/pkg-plist' Xsbin/sasp END-of-sasp-0.1/pkg-plist echo x - sasp-0.1/pkg-message sed 's/^X//' >sasp-0.1/pkg-message << 'END-of-sasp-0.1/pkg-message' XA tool that permits to use a gateway whatever IP we have END-of-sasp-0.1/pkg-message echo x - sasp-0.1/pkg-descr sed 's/^X//' >sasp-0.1/pkg-descr << 'END-of-sasp-0.1/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). 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-0.1/pkg-descr echo x - sasp-0.1/distinfo sed 's/^X//' >sasp-0.1/distinfo << 'END-of-sasp-0.1/distinfo' XMD5 (sasp-0.1.tar.gz) = 01cdaf87a0ac27bc5d52a01e4e858c78 XSIZE (sasp-0.1.tar.gz) = 3709 END-of-sasp-0.1/distinfo echo x - sasp-0.1/Makefile sed 's/^X//' >sasp-0.1/Makefile << 'END-of-sasp-0.1/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://sviat.opengeeks.it/codes/sasp/ X XMAINTAINER= sviat@OpenGEEKS.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 XNO_WRKSUBDIR= yes X X.include <bsd.port.mk> END-of-sasp-0.1/Makefile exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504080846.j388k20J086204>