From owner-freebsd-net Mon Feb 26 5:48:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from urban.iinet.net.au (urban.iinet.net.au [203.59.24.231]) by hub.freebsd.org (Postfix) with ESMTP id B182137B503 for ; Mon, 26 Feb 2001 05:48:54 -0800 (PST) (envelope-from julian@elischer.org) Received: from elischer.org (i080-201.nv.iinet.net.au [203.59.80.201]) by urban.iinet.net.au (8.8.7/8.8.7) with ESMTP id VAA13786; Mon, 26 Feb 2001 21:48:44 +0800 Message-ID: <3A9A5E92.A9837700@elischer.org> Date: Mon, 26 Feb 2001 05:48:02 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Juha Lindstrom Cc: freebsd-net@freebsd.org Subject: Re: gateway/proxy arp References: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Juha Lindstrom wrote: > > Hi! > > I have a somewhat tricky situation with a gateway/proxy arp setup. Let me > quickly tell you some backgrounds: > > 1) I'm connected to internet via university LAN > 2) university only allows one MAC address to communicate with the outside > world at a time, thus I can not use a HUB > 3) I have 2 real IP addresses which I want to assing to 2 different > computers, one for fbsd and one for windows > > Ok, I'm new to fbsd but I have used slackware linux earlier and managed to > get this system to work in the following way: > > 1) setup eth0 to communicate with outside world using DHCP to get the > necessary info > 2) ifconfig eth1 (=interface to connect with windows) 192.168.1.1 up > 3) arp -i eth0 -s pub > 4) route add metric 1 dev eth1 > > Now, I managed to get those commands to work with fbsd with one exception > - the ARP comman. Seems that fbsd doesn't allow me to specify the > interface like it does in the linux implemation. And this results in > windows discovering another computer using it's MAC address and then > shutting down network. > > So, the question is - how would I accomplish this in fbsd? Please, give as > detailed information as you possibly can since I'm new to fbsd. use natd # man 8 natd NATD(8) FreeBSD System Manager's Manual NATD(8) NAME natd - Network Address Translation Daemon SYNOPSIS natd [-unregistered_only | -u] [-log | -l] [-proxy_only] [-reverse] [-deny_incoming | -d] [-use_sockets | -s] [-same_ports | -m] [-verbose | -v] [-dynamic] [-in_port | -i port] [-out_port | -o port] [-port | -p port] [-alias_address | -a address] [-target_address | -t address] [-interface | -n interface] [-proxy_rule proxyspec] [-redirect_port linkspec] [-redirect_proto linkspec] [-redirect_address linkspec] [-config | -f configfile] [-log_denied] [-log_facility facility_name] [-punch_fw firewall_range] DESCRIPTION This program provides a Network Address Translation facility for use with divert(4) sockets under FreeBSD. It is intended for use with NICs - if you want to do NAT on a PPP link, use the -nat switch to ppp(8). The natd normally runs in the background as a daemon. It is passed raw IP packets as they travel into and out of the machine, and will possibly change these before re-injecting them back into the IP packet stream. [...] everything will appear to come from the one (freeBSD) machine. > > Thank you in advance > > Juha > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message