Re: Networks,,,,,,,,,,,,,,,,,,,,

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2004-10-16 at 20:36 -0500, Phil Scherzinger wrote:
> I have two computers.  Each wired to a linksys broadband router.  The
> see and can access the outside world, but I can not telenet or ftp
> them.  I can ping the ip address that the router (with dhcp) has given
> them.
>  
> What I would like to do is:
>  
> 1.  be able to share files between the two boxes, like nfs.
> 2.  be able to address the boxes by a name rather then a number
> 3.  make telnet, ftp and ssh work between the two
> 4.  because the router uses dhcp, can I get the same ip on each box
> everytime?
>  
>  
> I know this is a big task, but can some one help me get started?  
>  
>  
> Phil Scherzinger
> pscherz@xxxxxxxxxxxxx


Wow, Paul.  Not asking much, are you?  :-)

For future reference, please do not post to the list in HTML.  It looks
like you are using Earthlink's mail.  I don't know how to turn HTML off
there, but you should really investigate that.

Answers below:

1)  You said you wanted to "share files between the two boxes, like
nfs."

To run an NFS server you need at the very least the portmap, nfslock and
nfs services to run.  To do this, run these commands as root:

chkconfig portmap on
chkconfig nfslock on
chkconfig nfs on

After that, you can run the commands:

service portmap restart
service nfslock restart
service nfs restart

Now, since you are asking these services to restart and they may or may
not already be running, you might see some [FAILED] errors when the try
to shut down.  No worries there, ignore it.

Next, you will need to decide what part of your hard drive to share (in
the Linux and Unix world, sharing a section of your hard drive is called
"exporting a filesystem").  For example's sake, I will pretend you've
decided to export the /home directory.  The file you will want to modify
is /etc/exports.  It's a plain text file and you can edit it with your
favorite text editor.  You will add a line that looks something like
this:

/home *(ro)

This shares the /home directory to everyone (this is really bad security
but is the most simple setup).  The asterisk (*) is a wildcard meaning
"everyone."  The (ro) means that the directory is shared read only.
Please run the command:

man exports

for a better explanation of the format for the /etc/exports file.  

Once you have the exports file set up, you can run the command:

exportfs -a

This will export all the filesystems listed in /etc/exports.  Please
issue the command:

man exportfs

for more details.

2)  You said you wanted to be able to "address the boxes by a name
rather then a number."  There are a number of ways you can do that.  For
now, since you are new, I will describe what I consider the easiest way
to do it.

There is a file called /etc/hosts.  It's syntax is like this:

10.20.30.40  fullname.example.com  alias

The first part is the ip address of the host you are identifying.  The
second field is the fully qualified domain name (FQDN), also referred to
as the canonical hostname, of the host.  The third field is the alias or
short name of the host.

So, if you have two computers called bill.example.com and
ted.example.com, and bill.example.com has the address 192.168.0.101 and
ted.example.com has the address 192.168.0.102, then your hosts file
might have the following two lines in it:

192.168.0.101  bill.example.com  bill
192.168.0.102  ted.example.com  ted

Note that these lines need to be there on both bill's and ted's hosts
file!  

You will find that the hosts file seems messed up on each of the
machines when you first open it.  On bill it will probably llok like
this:

127.0.0.1  localhost.locadomain localhost bill.example.com bill

It's like that for a reason, but if you are going to assign static
addresses then you can fix it so it looks like this:

127.0.0.1  localhost.locadomain  localhost
192.168.0.101  bill.example.com  bill
192.168.0.102  ted.example.com  ted

Please issue the command:

man hosts

for further details.

3)  You said you wanted to "make telnet, ftp and ssh work between the
two."  Well, to do that, you need to make sure that the telnet, ftp and
ssh servers and clients are installed.

Run this command:

rpm -qa | egrep "telnet|ssh|ftp"

You want to make sure that the following (at least) are installed:

telnet-server
telnet
openssh-server
openssh-clients
vsftpd
ftp

Having said that, I strongly recommend that you NOT use telnet - it is
horribly insecure.  ssh is just as easy to use and it doesn't send your
password in plain text over the network.  IMHO, telnet is a Bad Thing
(TM).  I will include the instructions for telnet below in case you
really really like to be wild and dangerous.

Anyway, once you see that the servers are installed, you will want to do
this:

chkconfig telnet on
chkconfig vsftpd on
chkconfig sshd on

service vsftpd restart
service sshd restart

You don't need to worry about the telnet daemon - it is handled by
xinetd and xinetd restarts when one of the services it manages is turned
on by chkconfig.

So, once that is done, you can test connectivity between each box.  To
test ftp, issue the command:

ftp bill.example.com

Obviously you will substitute your hostname for bill.example.com.

To test ssh, you will issue the command:

ssh user@xxxxxxxxxxxxxxxx

Substitute your user and hostname.

For telnet, you can just issue the command:

telnet bill.example.com

with the appropriate substitutions.

Please issue the following commands:

man vsftd
man vsftd.conf
man telnetd
man telnet
man sshd
man sshd_config
man ssh

for more info on all these services.

4)  You asked "can I get the same ip on each box everytime?"  Yes, you
can.  You can do it two ways.  

The first is via static DHCP assignments on your DHCP server (the
broadband router you have).  Read the instructions that came with it - I
don't know what you have so I can't help you there.

The second is to not use DHCP for your Linux hosts.  To statically
assign addresses, issue either the command:

system-config-network

or

netconfig

Since you are new, I recommend you use system-config-network from inside
your GUI so that you can access the most excellent manual from the Help
menu.

In either case, you will want to assign your static ip address (like
192.168.0.101), your hostname, and so on.  Read the manual for full
details.

I hope that you've found this information helpful.  In the future, you
might seriously consider asking one question per post.  I almost deleted
your post because you asked so much information all at once.  It is more
likely that someone will see a single question and fire off a quick
answer than to write the volume that I've written here.

Cheers!
-- 
A: Because people read from top to bottom
Q: Why is top posting bad?

Thomas Cameron, RHCE, CNE, MCSE, MCT


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux