ports/71381: New port:: A tool that, installed on a gateway, permits clients to use it whatever IP they have
Luigi Pizzirani
l.pizzira at virgilio.it
Sun Sep 5 12:50:34 UTC 2004
The following reply was made to PR ports/71381; it has been noted by GNATS.
From: Luigi Pizzirani <l.pizzira at virgilio.it>
To: FreeBSD-gnats-submit at FreeBSD.org, freebsd-ports-bugs at FreeBSD.org
Cc:
Subject: Re: ports/71381: New port:: A tool that, installed on a gateway,
permits clients to use it whatever IP they have
Date: Sun, 5 Sep 2004 14:44:01 +0200
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 at 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 <l.pizzira at virgilio.it>
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 at 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 at 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 <bsd.port.mk>
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
More information about the freebsd-ports-bugs
mailing list