Subject: Re: router
To: None <port-i386@netbsd.org>
From: David Vyskocil <david.vyskocil@wanadoo.fr>
List: port-i386
Date: 04/08/2002 15:53:10
Oops,
I forgot to say I've configured the routing table too and set default
gateway to tun0 interface.(modem)

#route show
Routing tables

Internet:
Destination      Gateway            Flags
default          80.13.150.1        UG
ANice-202-1-1-1. 80.13.xxx.xxx      UH
loopback         127.0.0.1          UG
localhost        127.0.0.1          UH
192.168.1.0      link#1             U
192.168.2.0      link#2             U
yoyo.home        8:0:0:28:xx:xx     UH
albert.home       8:0:0:28:xx.xx     UH
vax.home          8:0:2b:xx:xx:xx    UH    :-))


PS:
I must say that previously I've setted up a router under Linux Mandrake-8.1
and got _lower performances than NetBSD-1.5.2 !
And my Brother setted up one under Linux MDK-8.2 and got many strange
deconnexions probably caused by pppd -> pppoa2 or usb layer....

david.vyskocil@wanadoo.fr

>
> > Dear All,
> >
> > I would like to run a host as a router, but I need not run the RIP in
the
> > router (i.e., I would use the static routing table). Which daemon should
I
> > run in the router? (routed, gated or others) Thanks.
> >
> > -Richard
>
> I've configured up a box as a host/router by setting IPNAT and IPF.
> - IPNAT to route my local network (2 ethernet cards) and Internet (ADSL
> modem)
> - IPF to act as a firewall
>
> #cat /etc/ipnat.conf
> map tun0 192.168.1.0/24 -> 0/32 proxy port ftp ftp/tcp
> map tun0 192.168.1.0/24 -> 0/32 portmap tcp/udp 40000:60000
> map tun0 192.168.1.0/24 -> 0/32
> map tun0 192.168.2.0/24 -> 0/32 proxy port ftp ftp/tcp
> map tun0 192.168.2.0/24 -> 0/32 portmap tcp/udp 40000:60000
> map tun0 192.168.2.0/24 -> 0/32
>
> #cat /etc/ipf.conf
> pass in from any to any
> pass out from any to any
>
> #cat /etc/hosts
> ::1                    localhost
> 127.0.0.1        localhost
> 192.168.1.1     routeur.home     routeur
> 192.168.2.1     routeur.home     routeur
> ...
>
> You must enable packet forwarding and some misc stuff in kernel.
> Look at /usr/share/examples/ipf/ for some examples.