Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jul 2003 14:04:08 -0700
From:      Kevin Stevens <Kevin_Stevens@pursued-with.net>
To:        "Michael Vondung" <michael@vcommunities.net>
Cc:        freebsd-newbies@freebsd.org
Subject:   Re: Sharing Internet access with a XP box.
Message-ID:  <DD43989E-C075-11D7-A9C7-000A959CEE6A@pursued-with.net>
In-Reply-To: <003901c35444$618129f0$fd4990d4@equilibrium>

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

On Sunday, Jul 27, 2003, at 06:38 US/Pacific, Michael Vondung wrote:

> I've installed FreeBSD 4.8 on a second machine (a P3/700/256M with a 
> 20 GB
> HD). The installation (I did several, just to familiarize myself with 
> the
> various options) went smooth. The machine it is on does not have a 
> direct
> connect to the internet. I bought a network card (Intel PRO/100M 
> Desktop
> adapter, which was properly recognised by FreeBSD -- a new experience 
> to
> actually check compatibility lists before purchasing a piece of 
> hardware)
> for the FreeBSD machine, and connected it to my XP workstation (a
> P4/2.6G/512M with currently 80 GB, which has an Intel PRO/100 VE 
> adapter
> on-board) with a crossed cable. This workstation runs Windows XP Pro, 
> and
> connects to the Internet via a dial-up ISDN connection (FritzCard). It 
> does
> not have a static IP address, and it is *not* permanently connected to 
> the
> 'net.
>
> My next "bigger" step is that I'd like FreeBSD to use/share the 
> Internet
> connection of the XP machine so that I can download ports and 
> packages, and
> learn more about maintaining the system.

Ok.  This is mostly a Windows XP ICS (Internet Connection Sharing) 
issue.  You should first read the Windows documentation on setting up 
ICS to make an IP address available on that Intel Ethernet interface.  
You would prefer it to be a single fixed address rather than assigned 
from a DHCP scope on the  XP box, because it makes the configuration 
somewhat simpler on the BSD side for a beginner.

>  Ideally, the FreeBSD box should
> "know" whether the XP machine is currently connected to the 'net.''

Why is that a goal?

>  This
> sounds simply, but I already declare defeat at this point because I 
> don't
> even know where to start.


> This is actually the "destination", and I first tried something 
> easier: to
> run a telnet client on the XP machine and connect to it from the BSD 
> box. I

You would be better advised to use an SSH client for two reasons: 
first, telnet is deprecated and you might as well learn what you'll be 
more likely to use in the future; second, because ssh is already 
supported on FreeBSD and you have to jump through a couple of hoops to 
enable telnet.

PuTTY is a wonderful ssh (and telnet) program that runs on all flavors 
of Windows.  It is free, fast, effective, small in size, does not embed 
itself in the registry, and is the first hit found on Google for the 
search terms "putty ssh".  Regardless of any future involvement in 
FreeBSD it's a good addition to your XP machine.

> assigned a fictive IP address to the Ethernet card in the FreeBSD box
> (1.2.3.4) and tried to telnet to that address. (At this point you can 
> tell
> that I never worked with LANs.) Then I tried to telnet to the dynamic
> address the XP box currently had (why, I don't know!). Neither idea 
> had any
> success.

First, you can't just use random IP addresses.  Second, XP doesn't run 
a telnet "answering" program by default (neither does FreeBSD, as 
mentioned above).  A program that sits around waiting to respond to 
requests is  usually called a service under Windows, or a daemon under 
Unix-ish operating systems; or, more generically, a server.  Since you 
weren't running a telnet server on XP there was nothing there to 
"answer" your telnet session request.  (Assuming it was received, which 
it probably wasn't because you made up the address).

>  So, in addition to my actual question (the "shared" Internet
> access), I actually don't have an idea how to make both machines 
> "talk" with
> each other, regardless of any Internet connection. Like I said, I do 
> sound
> hopelessly helpless. :)

The most common test for connectivity is the "ping" program, across all 
platforms using TCP/IP.  Telnet or SSH are "higher level" programs; 
there can be a number of things beyond basic network connectivity that 
they need in order to work, as we saw above.  It's generally a good 
idea to start network troubleshooting by trying to ping  (by IP 
address, not name) a remote host.

The first step is to assign an appropriate address/netmask to the XP 
Intel NIC, the ICS setup should help with this.  It would probably 
begin with 10.0., 172.16., or 192.168.  These encompass the address 
ranges set aside for private use.  The ICS service will translate from 
these addresses to the "public" address assigned to your ISDN interface.

Once that is done, assign an appropriate address/netmask to the BSD 
machine's interface, using fixed addressing or DHCP depending on how 
you set up ICS as mentioned above.  Now you should be able to ping.

> On a side note, my "actual goal" is to eventually turn the FreeBSD box 
> into
> a local IMAP/NNTP server that gets data through the Internet 
> connection of
> the XP machine. The mail/news programs on the XP machine would then get
> their data from the FreeBSD box.

Quite reasonable.  When you get to that point, I suggest looking at 
"leafnode" for NNTP, and the IMAP server that comes with pine 
(uw-imap), or 
dammit-I-can't-remember-the=other-big-one-someone-chime-in-here!  ;)  
--  NB: just remembered, it's "cyrus".

>  It would probably be much easier if the
> FreeBSD box connected to the net directly, however, this isn't possible
> because it does not have a free PCI slot, and I can't "stuff" another 
> ISDN
> card into it (I'd also prefer not have to buy another one).

It actually would be easier, or at least most common, if your internet 
connection terminated on a router/switch with separate ports connected 
to the two machines.  However, while these devices are now extremely 
cheap for Ethernet connected equipment (coming from a cable or DSL 
modem); they are NOT particularly cheap for an ISDN user.  If you ever 
switch from ISDN you should reassess.

> "Down the road", my plan is to get a second 40 or 80 GB HD for my 
> (current)
> XP box and put FreeBSD on it and then dual-boot.

Most people are happier having both machines active, perhaps sharing a 
single monitor/keyboard/mouse.

>  The reason I want the
> "other" PC to function as "external" IMAP server is so that I will
> eventually be able to maintain mail via both XP and BSD, without 
> ending up
> with different mail databases. (I need Outlook as well as a native 
> Windows
> environment for job-related reasons, so I can't do without XP for some 
> time,
> but would like to also be able to do mail under FreeBSD. Having mail 
> stored
> on a different computer that operates as an IMAP server is the best 
> idea I
> can come up with. This is purely theoretical.)

That's how I do it.  Mail is delivered to/from my FreeBSD server (soon 
to go away and be replaced with a Mac G5 tower running OS X, but the 
functionality will be the same), and accessed by IMAP via:
XP machine running Outlook, W2K laptop running Outlook Express, Mac 
PowerBook running OS X/Mail, pine (a terminal-based email and 
newsreader), and squirrelmail, a web server that runs on FreeBSD and 
provides a web-based (Hotmail-like) interface I can access remotely 
from the Internet.  All the mail stays where it should and I don't have 
issues with multiple copies, read mail appearing as new on other 
machines, etc.

> My thanks for suggestions, thoughts and help in advance,

You need to bulk up your understanding of basic TCP/IP configuration 
issues a bit or you're going to get frustrated.  You should understand 
the terms: IP address; subnet mask, default gateway/default route, 
port, DNS, host name, DHCP and protocol; approximately in that order.

KeS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DD43989E-C075-11D7-A9C7-000A959CEE6A>