Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 1999 04:56:25 +0100
From:      The Unicorn <unicorn@blackhats.org>
To:        Michael Steinfeld <mike@sprawlnet.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: sharing a single modem connection with natd.
Message-ID:  <19991111045625.T66052@unicorn.blackhats.org>
In-Reply-To: <001201bf2b8f$cd2820a0$86a9e0d0@sprawlnet.com>; from mike@sprawlnet.com on Wed, Nov 10, 1999 at 10:25:17AM -0500
References:  <001201bf2b8f$cd2820a0$86a9e0d0@sprawlnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Michael!

On Wed, 10 Nov 1999, Michael Steinfeld wrote:

> I have 2 computers in my  home network. One of them is running FreeBSD
> 3.3-Stable and the other Linux SuSE 6.1
>
> The FreeBSD  box has the modem in  it which connects to my  ISP and is
> assigned a dynamic IP.
>
> FreeBSD -  pn0 is assigned 192.168.0.98
> Linux -       eth0 (rl0) is assigned 192.168.0.99
> 
> I set up natd as follows:
> 
> 1) Compiled in options ipfirewall ipdivert in a new kernel
> 2) added natd_enable="YES" firewall_enable="YES" gateway_enable="YES" in rc.conf
> 3) I edited /etc/services   natd	  8668/divert
> 
>  # now  i know  this  shouldnt be  very  difficult but  there must  be
> something i am over-looking.

Yes you are...

> After  i compiling the  new kernel, editing  the files i  restarted my
> Freebsd box.
> 
> after using ' ppp -alias my-isp ' i run ' natd -interface tun0 '
>
> The freebsd  box is connected to  the internet at this  point, but the
> linux box isnt. I set eth0 to use pn0's address as the gateway. what i
> ultimately want  to do is share  the one internet connection  for both
> box's.

Which  is  very  similar  to  the configuration  I  have  running,  only
difference is that I have some more boxes connected and am using ISDN to
connect to the Internet.

> ( Yes, both box's are talking to one another)

Of course they are :-)

> if i issue '  nslookup ' on the linux box  after a considerable amount
> of time i get an error message  something similar to *** cant get name
> of 196.1.6.8 which 196.1.6.8 happens to be the nameserver of my isp.

Right, and that is where the "problem" lies. You have activated the ipfw
firewall, but by default  the rule is set to deny  all traffic. So setup
your firewall rules in /etc/rc.firewall and you should be OK.

> Any suggestions would greatly be appreciated.

Like I wrote above set up your firewall rules. If you just want to check
the configuration then  the command "ipfw add allow ip  from any to any"
would be sufficient.  But beware since you then have  opened your box to
basically allow all trafic from/to the Internet. A better way is to read
the ipfw manual page and set up the ipfw firewall rules you need.

> Michael Steinfeld

--- End of Quoted Text ---

Ciao,
Unicorn.
-- 
======= _ __,;;;/ TimeWaster ================================================
     ,;( )_, )~\| A Truly Wise Man Never Plays   PGP: 64 07 5D 4C 3F 81 22 73
    ;; //  `--;     Leapfrog With A Unicorn...        52 9D 87 08 51 AA 35 F0
==='= ;\ = | ==== Youth is Not a Time in Life, It is a State of Mind! =======
Echelon Teasers: NSA CIA FBI Mossad BVD MI5 Cocaine Cuba Revolution Espionage 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991111045625.T66052>