, "port-mac68k <port-mac68k@netbsd.org>
From: Bob Nestor <rnestor@augustmail.com>
List: port-mac68k
Date: 02/16/2001 17:43:31
Tim McNamara wrote:
>Well, I'm feeling slow on the uptake getting NAT set up. It still
>doesn't work. My NetBSD box can connect to to the Internet via my
>DSL router/hub without any problem.
>
>Here's my configuration thus far (I *think* this is all of it):
>
>/etc/rc.conf
>defaultroute="206.11.250.254" (ISP's gateway)
If you are still connecting your NetBSD system to your DSL router/hub
rather than directly to your incoming DSL line then your default gateway
is the router/hub. As I recall that address in your configuration is
192.168.1.1
>ipfilter=YES
>ipnat=YES
>ipmon=NO
>auto_ifconfig=YES
>net_interfaces=""
>flushroutes=YES
>dhclient=NO
>named=NO
>dhcpd=NO
>
>/etc/ifconfig.sn0
>inet sugaree netmask 255.255.255.0
>
I don't think this is correct. It should be:
192.168.1.3 netmask 255.255.255.0
That's the format of the file when it's created by sysinst and that works.
>/etc/ifaliases (this was mentioned in the NetBSD FAQs on networking)
>192.168.208.2 sn0 255.255.255.0
>
You only need this if you want to replace your DSL router/hub with the
NetBSD box or if you want to configure your intranet (your side of the
router/hub) such that your NetBSD box is supporting things like DNS,
Netatalk, Samba, etc.
>/etc/ipf.conf
>pass in from any to any
>pass out from any to any
>
>/etc/ipnat.conf
>map sn0 192.168.208.0/24 -> 206.11.250.116/32 portmap tcp/udp 10000:40000
>rdr sn0 206.11.250.116/32 port 80 -> 192.168.208.1 port 80
>
Again, not needed if you are running thru your router/hub which I though
you said was a LinkSys.
>/etc/netstart.local
>if [ -f /etc/ipnat.conf ]; then
> echo 'starting IP network address translation (ipnat)...';
> /usr/sbin/ipnat -f /etc/ipnat.conf
>fi
>
>/etc/rc.local contains
>sysctl -w net.inet.ip.forwarding=1
>
>/etc/hosts
>127.0.0.1 localhost onvoy.com
>#This machine
>206.11.250.116 sugaree sugaree.onvoy.com (this is a static IP address)
>#Some local machines
>192.168.208.1 tims-imac tims-imac.onvoy.com
>192.168.208.3 pb145b pb145b.pnvoy.com
>
>(I note that in Bob Nestor's setup files the other local machines are
>commented out. Should this be the case here? Should the LAN IP
>address of the NetBSD box be included under "some local machines?").
>
That's because I run a local DNS for systems on my side of the router/hub
box.
>The results of all this are as follows: as mentioned, I can access
>the Internet via the DSL router/hub with the NetBSD box. None of the
>other computers (well, tims-imac since pb145b isn't connected to the
>network yet) can access the Internet. I cannot ping the NetBSD
>machine from the other computer or vice versa. On the iMac, I have
>the IP address configured to be 192.168.208.1 and the gateway
>configured as 192.168.208.2 (the internal IP address of the NetBSD
>machine); I have left the nameservers and domain blank since I don't
>have named running.
>
I'd sugget you start with trying to get just the NetBSD system working
with minimal network setup/changes first. Then add things to that one
step at a time. I've got a feeling you have two or three configurations
in mind and you're trying to pick and choose options for each to merge
into your setup.
-bob