Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 1999 10:25:17 -0500
From:      "Michael Steinfeld" <mike@sprawlnet.com>
To:        <freebsd-stable@freebsd.org>
Subject:   sharing a single modem connection with natd.
Message-ID:  <001201bf2b8f$cd2820a0$86a9e0d0@sprawlnet.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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.

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.

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

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. 


Any suggestions would greatly be appreciated.



Michael Steinfeld         | The only good is knowledge and the only evil ignorance. --Socrates
Unix Administrator       |  mike@sprawlnet.com    // Salute to JGB and The Boys .. still going down that road.
Sprawlnet.com INC     

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I have 2 computers in my home network. One of them is running 
FreeBSD 3.3-Stable and the other Linux SuSE 6.1</FONT></DIV>
<DIV><FONT size=2>&nbsp;</FONT></DIV>
<DIV><FONT size=2>THe FreeBSD box has the modem in it which connects to my ISP 
and is assigned a dynamic IP. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>FreeBSD -&nbsp; pn0 is assigned 192.168.0.98</FONT></DIV>
<DIV><FONT size=2>Linux&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eth0 
(rl0) is assigned 192.168.0.99</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>I set up natd as follows:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>1) Compiled&nbsp;in options ipfirewall ipdivert in a new 
kernel</FONT></DIV>
<DIV><FONT size=2>2) added natd_enable="YES" firewall_enable="YES" 
gateway_enable="YES" in rc.conf</FONT></DIV>
<DIV><FONT size=2>3) I edited /etc/services&nbsp;&nbsp; natd	&nbsp; 
8668/divert</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;# now i know this shouldnt be very difficult but there 
must be something i am over-looking.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>After i compiling the new kernel ,editing the files i 
restarted my Freebsd box.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>after using ' ppp -alias my-isp ' i run ' natd -interface tun0 
'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>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.</FONT></DIV>
<DIV><FONT size=2>what i ultimately want to do is share the one internet 
connection for both box's.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>( Yes, both box's are talking to one another)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>if i issue ' nslookup ' on the linux box after a considerable 
amount of time</FONT></DIV>
<DIV><FONT size=2>i get an error message something similar to&nbsp; *** cant get 
name of 196.1.6.8 </FONT></DIV>
<DIV><FONT size=2>which 196.1.6.8&nbsp; happens to be the nameserver of my isp. 
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Any suggestions would greatly be appreciated.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Michael 
Steinfeld&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | The only good is 
knowledge and the only evil ignorance. --Socrates<BR>Unix 
Administrator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; <A 
href="mailto:mike@sprawlnet.com">mike@sprawlnet.com</A>&nbsp;&nbsp;&nbsp; // 
Salute to JGB and The Boys .. still going down that road.<BR>Sprawlnet.com 
INC&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001201bf2b8f$cd2820a0$86a9e0d0>