Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 1999 19:39:01 -0800
From:      Mike Thompson <miket@dnai.com>
To:        Dave Clarke CRP <djclarke@tssc.co.nz>, freebsd-questions@FreeBSD.ORG
Subject:   Re: FreeBSD Internet Access for Win95 LAN
Message-ID:  <4.1.19990127193824.00ac2580@mail.dnai.com>
In-Reply-To: <36AFBCA0.428@tssc.co.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
At 02:25 PM 1/28/99 +1300, you wrote:
>I am currently using FreeBSD 2.2.6 as a dial up Internet Server for a
>Windows 95 LAN and have the following questions I hope someone can help
>with.
>
>1. Each time a Windows 95 machine is rebooted the FreeBSD machine
>dials out to the Internet.  Any clues on how to stop this as we 
>have to pay for each phone call.

I have a very similar configuration on an ISDN line and similar 
problems.

To fix this you want to prevent DNS lookups from occurring when 
the systems are simply talking to each other on the local LAN.  
Although you can configure a local DNS, a simpler alternative 
is to edit the hosts file on each of the Win 95/98 systems 
and the FreeBSD system so they each know about the IP addresses
of the other systems.

First, create a "C:\Windows\hosts" on each of your Win 95/98 
systems with the following information (Substitute your
IP address, system names and service provider name):

192.168.0.1     freebsd_sys freebsd_sys.your_isp.com
192.168.0.2     win95_sys1 win95_sys1.your_isp.com
192.168.0.3     win95_sys2 win95_sys2.your_isp.com
...

Then, add the same information to the "/etc/hosts" file on your
FreeBSD system:

192.168.0.1     freebsd_sys freebsd_sys.your_isp.com
192.168.0.2     win95_sys1 win95_sys1.your_isp.com
192.168.0.3     win95_sys2 win95_sys2.your_isp.com
...

Finally, edit the "/etc/host.conf" file on the FreeBSD system so 
that the hosts file is checked first, then DNS/Bind and finally 
NIS (if NIS is enabled).  My "/etc/hosts.conf" file is 
set as below.

hosts
bind
# nis

After doing this you should now be able to boot any system and 
log into your FreeBSD system via telnet without causing your 
FreeBSD system to dial out.

>3. Is it necessary or desirable to use the FreeBSD as a local DNS
>server, if so can someone send some example config files as the 
>examples in the FAQ and Handbook cause errors in named.

If your ISP provides DNS services you really don't need to run
a local DNS if you don't want/need to.  If you do use your
ISP's DNS you want lookups to only occur when the FreeBSD or 
Win 95/98 systems are truly going out to the Internet.

Also, you will want to add filters to PPP to filter out
NETBIOS packets from causing this your system to dialout. 
This may or may not be a problem for you.  If it is you will
want to add rules similar to the ones shown below to your
ppp.conf file (check the ppp documentation).

# The following dial rules prevent NETBIOS (port 137, 138,
# 139 udp or tcp) from establishing a connection to the 
# remote network.
 set dfilter 1 deny udp src eq 137
 set dfilter 2 deny udp src eq 138
 set dfilter 3 deny udp src eq 139
 set dfilter 4 deny tcp src eq 137
 set dfilter 5 deny tcp src eq 138
 set dfilter 6 deny tcp src eq 139

I hope this information is useful.

Mike Thompson
miket@dnai.com



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



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