LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2007, 04:36 PM   #1
mattjohnstone22
Member
 
Registered: Jan 2007
Posts: 65

Rep: Reputation: 15
Networking Help Please


Hi all,

Would like to network two computers together (both using Suse 10.2 KDE) to share internet access.

One distro is the 64bit version while the other is 32 bit.

Network cable is plugged up but have no idea how to make each computer recognise the other.

Any help appreciated.

Cheers,

matt.
 
Old 03-20-2007, 05:37 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I do not know the tools for suse but configure the settings like this.

I assume you have the router configured. If so then set the network to dhcp and let it get an IP and other info from the router to setup the interface. I assume the router has a dhcp server setup and running.

Thats the basics to it.

Brian
 
Old 03-20-2007, 07:31 PM   #3
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
I think the OP has a modem/router connected to 1 PC and wishes to share the internet connection from that to another machine?
 
Old 03-20-2007, 08:04 PM   #4
IndyGunFreak
Senior Member
 
Registered: Aug 2003
Location: Indpls
Distribution: Laptops: Debian Jessie XFCE, NAS: OpenMediaVault 3.0
Posts: 1,355

Rep: Reputation: 70
Quote:
Originally Posted by ethics
I think the OP has a modem/router connected to 1 PC and wishes to share the internet connection from that to another machine?

Unfortunately he didn't make that very clear, its hard to tell from his post.

If the OP doesn't have a router, thats the easiest way to get this done quickly and with little fuss.

http://www.newegg.com/Product/Produc...82E16833122081

http://www.newegg.com/Product/Produc...82E16833124007

IGF
 
Old 03-21-2007, 09:38 AM   #5
mattjohnstone22
Member
 
Registered: Jan 2007
Posts: 65

Original Poster
Rep: Reputation: 15
Hi again,

Right erm, sorry the post wasn't very clear.

ethics was right, thats all I am trying to do. I don't have a router. Basically, this comp is connected to both the modem, and the other computer. (2 network ports).

All I want to do is get the other computer to find this one and vice versa, so that they can both share the modem somehow. I did this once before with windows, but I am relatively new to linux. I would presume there is a way of doing it using Yast, but no idea how.

Cheers for any further help, matt.

Last edited by mattjohnstone22; 03-21-2007 at 09:40 AM.
 
Old 03-21-2007, 05:50 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
It would be 10 times easier to use a cheap store bought wired router. But if you wish to use the machine as a router then this should help in details of settings.

This is what I would do. First get eth0 on the one connected to the modem working. Configure and the machine can connect and browse the internet.

Now for eth1 on the same machine set the following info.
IP 192.168.1.1
Netmask or Subnet 255.255.255.0
Do not set a gateway on this interface. Iptables and masquerading will handle that for you.

On the 2nd machine
IP 192.168.1.2
Netmask 255.255.255.0
Gaetway 192.168.1.1
DNS same as the one you set on the machine one router.

Now go here and and answer the questions to setup a router/firewall configuration. http://easyfwgen.morizot.net/gen/

Save the script it generates to a file called firewall.sh. Place the file in /etc
Make the file executable using this command as root. ' /sbin/chmod +x /etc/firewall.sh '.

Execute the firewall script as root ' ./firewall.sh '.

Now test machine 2 to connect to the internet. If not try pinging 192.168.1.1 and see if it responds. If it does then ping google 216.239.39.99. If that works then you have an issue with DNS IP settings.

Get the above working and then you can setup samba or nfs or other tools to transfer files and share printers or whatever.

Brian

Last edited by Brian1; 03-21-2007 at 05:52 PM.
 
Old 06-05-2007, 09:38 AM   #7
ivailo
LQ Newbie
 
Registered: Jun 2007
Location: Bulgaria
Distribution: Debian (etch)
Posts: 5

Rep: Reputation: 0
Hi
I also try to connect two computers. I tried to make what was described above, however it didn't work. When i type /sbin/chmod +x /etc/firewall.sh it says "bash: /sbin/chmod: No such file or directory". then i tried to proceed but i got 'bash: ./firewall.sh: /bin/sh^M: bad interpreter: No such file or directory'

Can you tell me how to make it all work?

Thanks in advance
 
Old 06-06-2007, 09:09 AM   #8
Seagull
Member
 
Registered: Oct 2003
Location: Holland
Distribution: SuSE 10.0 SuSE 10.2
Posts: 70

Rep: Reputation: 15
Quote:
Originally Posted by ivailo
Hi
I also try to connect two computers. I tried to make what was described above, however it didn't work. When i type /sbin/chmod +x /etc/firewall.sh it says "bash: /sbin/chmod: No such file or directory". then i tried to proceed but i got 'bash: ./firewall.sh: /bin/sh^M: bad interpreter: No such file or directory'

Can you tell me how to make it all work?

Thanks in advance
Make sure you are logged in as root. If not you'll not be able to access /sbin.
 
Old 06-14-2007, 08:48 AM   #9
ivailo
LQ Newbie
 
Registered: Jun 2007
Location: Bulgaria
Distribution: Debian (etch)
Posts: 5

Rep: Reputation: 0
Well, I logged in as root and when I tried to make this /sbin/chmod i got /sbin/chmod "bash: /sbin/chmod: No such file or directory". I typed su and after that tried it once again but the result did not change. So I decided to view if the was such file and there wasn't. I don't know whether it is normal, but those are the facts(I used ls -a).

I will appreciate any help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration