Subject: Re: One port, two Macs
To: Amitai Schlair <amitai.schlair@usa.net>
From: David Brownlee <abs@anim.dreamworks.com>
List: port-mac68k
Date: 07/16/1997 08:27:41
	Sounds likfe a perfect example for ipnat (built into NetBSD
	-current) This will work with pppd over a modem or straight
	ethernet.

	You'll need to get two cards for the IIci - one outgoing
	and one to connect to the 7100, or use a serial link and ppp
	between the two (less ideal)

	Ipnat notes follow :)

    Brief notes on ipnat (revision 5 :)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	Ipnat performs Network Address Translation (NAT), also known as
	IP-Masquerading for the less well informed.

	Ipnat is part of ipfilter, which is distributed with
	NetBSD -current, and can be added to a 1.2 or 1.2.1 setup.

        There is a webpage for ipfilter at:
                http://coombs.anu.edu.au/~avalon/ip-filter.html

	Assuming you can get a static address allocated by your ISP:

	a) Have a gateway host (eg: machine with local ethernet and either
	   a modem or an outgoing ethernet connection)
	b) Setup that machien to talk to the outside world, either using
	   ppp on a modem, or a 'standard' ethernet setup.
	   (There are other FAQs describing how to do this :)
	c) Number your internal machines on a reserved network
	       (eg 10.x.x.x
		    ethernet address of gateway 10.0.0.1
		    ethernet address of 1st local host 10.0.0.2
		    etc)
	d) Ensure /etc/mygate on all other machines contains the
	   internal network address of the gateway (10.0.0.1)
	e) On the gateway:
	   Create an /etc/ipnat.conf file:
	   map EXT 10.0.0.0/8 -> X.X.X.X/32 portmap tcp/udp 10000:20000
		(Where EXT is your external (to the world) network interface,
		 'ppp0' for a modem over ppp, otherwise sn0, or le0 etc)
	        (X.X.X.X is the address of your EXT interface,)
	   Run 'ipnat -f /etc/ipnat.conf'.
           Run 'sysctl -w net.inet.ip.forwarding=1' (enable routing)

	If on a modem run pppd as normal.

	Now try to telnet out or web browse from another local machine.

	Once you have this working you probably want to add the
	startup, ipnat, and sysctl to the end of /etc/rc.local.
    	




		David/abs

    "Its a bright sunny california day outside, and you're inside."
    "And your point would be...?"


On Tue, 15 Jul 1997, Amitai Schlair wrote:

> The college I will be attending next year (i.e, in a month! yee-ha! :)
> allows only one device per network port. I have a IIci running NetBSD
> and a 7100 on MacOS. The college will only give me one Ethernet
> interface (either a transceiver for the 7100 or a card for the IIci).
> 
> I have a feeling their restriction is intended simply to limit the
> number of IP addresses. Is there a way to connect the two Macs and the
> one faceplate, via Ethernet, that uses only one IP address between the
> two? What hardware/software do I need?
> 
> Thanks for any help. I'm a newbie, so please write slowly. ;)
> 
> -- 
> Amitai Schlair
> amitai.schlair@usa.net
> --
>