Help - Search - Members - Calendar
Full Version: Simple 2 pc "linux network"
MandrivaUsers.org > Advanced Topics > Networking
LI-6YLUCY
Hello every BDY,
i was just wondering on how to connect 2pc "linux" with only cross wire and 2 NIC
without iptables and these hard stuff cause i am still a NOOBY and how to configure it through console no GUI deal2.gif and how to transfer data between them wink.gif
ThnX AloT.
SoulSe
iptables is used for advanced fire-walling etc.

All you need to do is give each machine an ip address (192.168.0.*) in the same range and off you go!

What do you want to do? Share files? Share printers? It all depends...
LI-6YLUCY
just by friend will bring his laptop which i will give him some files and take from him that's all
SoulSe
Cool, just us the Mandrake Control Centre to give each machine an IP adress in the same range.

For simple file-transfers I recommend setting up SSH and then using the scp command to copy files over the SSH port...

Setting up SSH in Mandrake is easy, so you shouldn't have any problems...

CODE
# urpmi open-ssh
LI-6YLUCY
plz can u tell me steps through command line not GUI applications
Thanks alot wink.gif
LI-6YLUCY
That can work on any linux distro. biggrin.gif
SoulSe
Not that simple - because in Mandrake, installing ssh will set things up for you, in Gentoo (for example) you will have to create your own ssh keys and start the sshd server.

Now, it will all be much easier if you do some reading and learning on your own. I am only going to point you in the right direction and help if you get stuck.

The scp command in universal:
CODE
$ scp -options file/directory user@host:/target
GoldenEye
Hi there,

In the pc you do:
open a console

(as root = #)

# ifconfig eth0 192.168.0.1

In the laptop:
open a console
(as root = #)

# ifconfig eth0 192.168.0.2

then try to ping each one using the ping command like this:

from pc:

# ping 192.168.0.2

you should see something like:

64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=1.94 ms
untill you force the ping stop using <Ctrl> + <c>

from laptop try the same but using this time the pc ip address:

# ping 192.168.0.1

you should see something like:

64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.94 ms
untill you force the ping stop using <Ctrl> + <c>
--------------------------------------------------------------------------------------

For sharing files using the console you can use sftp, you should have the ftp server enable.

try man sftp or by searchig on google for "ftp linux" and you get all you need.

---------------------------------------------------------------------------------------

I'm a portuguese linux user/administrator so don't look at my bad english ok.
jcmail@iol.pt
LI-6YLUCY
Thanks alot every one 4 helping me headbang.gif
frosterrj
how about setting this scenario up when both machines connect through the same router. For example, my desktop (wired) and laptop (wireless) share the same linksys router which is connected to my dsl modem.

If both machines are on, how can I pass stuff between them, no server involved. Is this possible? Doesnt sound like a SAMBA situation to me.

Thanks,
RF
SoulSe
QUOTE (GoldenEye @ May 10 2004, 04:19 PM)
Hi there,

In the pc you do:
open a console

(as root = #)

# ifconfig eth0 192.168.0.1

In the laptop:
open a console
(as root = #)

# ifconfig eth0 192.168.0.2

then try to ping each one using the ping command like this:

from pc:

# ping 192.168.0.2

you should see something like:

64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=1.94 ms
untill you force the ping stop using <Ctrl> + <c>

from laptop try the same but using this time the pc ip address:

# ping 192.168.0.1

you should see something like:

64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.94 ms
untill you force the ping stop using <Ctrl> + <c>
--------------------------------------------------------------------------------------

For sharing files using the console you can use sftp, you should have the ftp server enable.

try man sftp or by searchig on google for "ftp linux" and you get all you need.

---------------------------------------------------------------------------------------

I'm a portuguese linux user/administrator so don't look at my bad english ok.
jcmail@iol.pt

uh... I wouldn't recommend using ifconfig in Mandrake... in fact I'm not even sure that Mandrake has it.

Use the Mandrake Control Centre to setup your network - much simpler and safer for n00bs.

Also, scp is a much easier way to transfer files in this situation than going to the trouble of setting up an ftp server.
SoulSe
QUOTE (frosterrj @ May 11 2004, 05:12 AM)
how about setting this scenario up when both machines connect through the same router. For example, my desktop (wired) and laptop (wireless) share the same linksys router which is connected to my dsl modem.

If both machines are on, how can I pass stuff between them, no server involved. Is this possible? Doesnt sound like a SAMBA situation to me.

Thanks,
RF

Samba is for sharing files, etc. with WINDOWS machines. Only use it if you have a network with 'doze machines on it.

For simple file transfers USE SCP.

It is basically cp (the copy command) for network connections.

read.
iphitus
QUOTE (SoulSe @ May 11 2004, 04:43 PM)
QUOTE (GoldenEye @ May 10 2004, 04:19 PM)
Hi there,

In the pc you do:
open a console

(as root = #)

# ifconfig eth0 192.168.0.1

In the laptop:
open a console
(as root = #)

# ifconfig eth0 192.168.0.2

then try to ping each one using the ping command like this:

from pc:

# ping 192.168.0.2

you should see something like:

64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=1.94 ms
untill you force the ping stop using <Ctrl> + <c>

from laptop try the same but using this time the pc ip address:

# ping 192.168.0.1

you should see something like:

64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.94 ms
untill you force the ping stop using <Ctrl> + <c>
--------------------------------------------------------------------------------------

For sharing files using the console you can use sftp, you should have the ftp server enable.

try man sftp or by searchig on google for "ftp linux" and you get all you need.

---------------------------------------------------------------------------------------

I'm a portuguese linux user/administrator so don't look at my bad english ok.
jcmail@iol.pt

uh... I wouldn't recommend using ifconfig in Mandrake... in fact I'm not even sure that Mandrake has it.

Use the Mandrake Control Centre to setup your network - much simpler and safer for n00bs.

Also, scp is a much easier way to transfer files in this situation than going to the trouble of setting up an ftp server.

Actually soulse, its the opposite - MCC's network wizard is a frontend to ifconfig

In this case, ifconfig is a good idea as it will do a great impromptu network without having to reconfigure the system
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.