LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-10-2005, 08:15 PM   #1
LeninZ
LQ Newbie
 
Registered: Mar 2005
Location: Florida
Distribution: Suse 9.2 Pro / RedHat 9
Posts: 2

Rep: Reputation: 0
Suse machine as a router for a home network


Hello all.

Here is what I'm trying to do.

I have four destops and a laptop.
Three of the desktops are WinXP and the fourth one is Suse 9.2 Pro.
One of the XP desktops has wireless with internet connection sharing enabled.
Suse machine has 4 ethernet cards in it, I have no hubs of switches.

When I plug my wireless XP machine into Suse with a crossover Suse gets internet.

I want the suse machine to distribute internet to the other two XP desktops
and act as a file server to all three XP desktops.

I have found a tutorial on how to turn Suse into a router but after I have done everything it said none of the XP machines are recieving any packets!
No firewalls enabled machines are pluged into suse box with crossovers but
can't recieve any packets.

Can anyone help me please.

P.S.

I am a newb, with linux but I want to learn.
 
Old 03-11-2005, 12:31 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Each windows machine will need a gateway address matching the IP address of the NIC card on the SuSE server that they plug into. Also, run through the gateway setup.

On the SuSE, you will need to run the setup for each network card. Select a card and press the 'Change...' button.

Select edit, then select Routing. Make sure that the Enable IP Forwarding is selected. The Default Gateway setting should be the IP address of the Windows maching with the internet connection. Make sure that you have 'Connection Sharing' enabled on that Windows machine.

Because you have 4 ethernet connections, you will have a more involved routing table.
I think it will end up looking something like this:
Quote:
192.168.1.100 * 255.255.255.0 U 0 0 0 eth0
192.168.1.101 * 255.255.255.0 U 0 0 0 eth1
192.168.1.102 * 255.255.255.0 U 0 0 0 eth2
192.168.1.103 * 255.255.255.0 U 0 0 0 eth3
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.100 0.0.0.0 UG 0 0 0 eth0
The IP addresses here are made up.
The 192.168.1.103 address I made up for the Windows machine with the Ethernet connection.
You should select it in the Default Gateway drop down selector at the top of the dialog. This should be the IP address of the wireless windows box. The Network Address Translation will be provided by the windows box. The SuSE box will forward the traffic to one NIC or the other.

Normally, one would have a different subnet on each interface and the destinations would look like 192.168.1.0 , 192.168.2.0 , 192,168.3.0 , 192.168.4.0 .
Quote:
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.4.0 * 255.255.255.0 U 0 0 0 eth3
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.100 0.0.0.0 UG 0 0 0 eth0
This would entail putting each windows machine on a seperate subnet.

You would save yourself a lot of work if you just purchased a switch for $20, and used the SuSE box as a gateway and firewall to protect the non-wireless windows boxes.

You could run a crossover cable from the wireless windows computer to the SuSE computer, and run another Ethernet cable to the switch, where the other windows desktops and the laptop plug into.

The wireless-internet XP would be considered in the DMZ. Make sure that you have enabled the XP gateway on that machine also for services that you want to block, such as samba, ping, telnet, etal.

You might even consider replacing XP on that machine with a Linux firewall distribution. This way, there would be less installed that a potential attacker could try to exploit. Not having Internet explorer on the gateway would be a definite plus! You could also do things like offload the logs to the SuSE machine, and run snort on the gateway to detect penetration attempts.

----

You haven't included a lot of information on your original post, such as the output of 'ifconfig' and the output of 'route'. Providing them could point out errors in the configuration.

Last edited by jschiwal; 03-11-2005 at 12:39 AM.
 
Old 03-11-2005, 09:49 PM   #3
LeninZ
LQ Newbie
 
Registered: Mar 2005
Location: Florida
Distribution: Suse 9.2 Pro / RedHat 9
Posts: 2

Original Poster
Rep: Reputation: 0
ok, got home at last!

Here is the deal

The XP machine is 192.168.0.1 on the wired and 192.168.1.50 on the wireless.
Suse has 3 cards, #1 is plugged into the XP with crossover and working fine,
Suse gets internet and can ping the XP and it's all good.

How card #2 is 192.168.0.2 and is plugged into the XP2 with a crossover, but nothing happens.
The XP2 can't get any packets and can't get an IP.
I assigned the ip manually and after pinging the Suse for a while I got 3 packets, but that was it.
Suse recognizes the XP2 but says it's an Unreachable host.
XP2 picked up the right domain name (which is lenin.z) but no packets.

How here is some technical info:

ifconfig:

eth0 Link encap:Ethernet HWaddr 000:09:C4:FB:62
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:9ff:fec4:fb62/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16977 (16.5 Kb) TX bytes:6192 (6.0 Kb)
Interrupt:11 Base address:0xdc00

eth1 Link encap:Ethernet HWaddr 00:50A:7C:68:07
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:daff:fe7c:6807/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:451 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:53215 (51.9 Kb) TX bytes:702 (702.0 b)
Interrupt:5 Base address:0xe000

here is route:

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default pc001-d63537832 0.0.0.0 UG 0 0 0 eth0

here is some output when I restart the network:

Shutting down network interfaces:
eth0 device: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet
(rev 83)
eth0 configuration: eth-id-00:d0:09:c4:fb:62
removed `/var/run/sysconfig/route-stack-000001-eth0-eth1' done
eth1 device: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 64)
eth1 configuration: eth-id-00:50:da:7c:68:07 done
eth2 device: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 64)
eth2 No configuration found for eth2
Nevertheless the interface will be shut down.
eth2 configuration: done
Shutting down service network . . . . . . . . . . . . . done.
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
lo
lo IP address: 127.0.0.1/8 done
eth0 device: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet
(rev 83)
eth0 configuration: eth-id-00:d0:09:c4:fb:62
eth0 IP address: 192.168.0.3/24 done
eth1 device: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 64)
eth1 configuration: eth-id-00:50:da:7c:68:07
eth1 IP address: 192.168.0.2/24 done
eth2 device: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 64)
eth2 No configuration found for eth2 unused
Setting up service network . . . . . . . . . . . . . . done.
WARNING: Error inserting ipfwadm (/lib/modules/2.6.8-24-default/kernel/net/ipv4/
netfilter/ipfwadm.ko): Device or resource busy
SuSEfirewall2: Firewall rules successfully set from /etc/sysconfig/SuSEfirewall2

If you need more let me know

About replacing the XP wireless with linux, that'd be great if I could make wireless work on redhat
which is my other project that's been going for like 3 month!
If you could help me out with that it'd be even better.

Thanks for your time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
help me to set up a home network with the router/modem irena56 Linux - Networking 5 09-30-2005 04:26 PM
want to ssh/ftp to home machine (Slack) from office through home router fincher69 Linux - Networking 2 09-21-2005 11:55 PM
Home network setup with network firewall/router Gates1026 Linux - Networking 4 01-17-2005 09:26 PM
home network router problem sprachy Linux - Networking 4 04-21-2004 12:38 PM
Earthlink Home network Option using router ldare Linux - Networking 2 04-21-2003 09:56 PM


All times are GMT -5. The time now is 11:45 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration