Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Sep 2004 20:52:00 GMT
From:      Luigi Pizzirani <l.pizzira@virgilio.it>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/71381: New port:: A tool that, installed on a gateway, permits clients to use it whatever IP they have
Message-ID:  <200409042052.i84Kq0OH026143@www.freebsd.org>
Resent-Message-ID: <200409042100.i84L0fmV055538@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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 <bsd.port.mk>
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409042052.i84Kq0OH026143>