LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-21-2006, 02:02 PM   #1
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Rep: Reputation: 0
Unhappy Problem with setting up my SuSE as router


Hi

My problem is that after all my efforts and reading i cannot setup my suse to act like a router for my home network.

The situation is like this:
I have a PC with both windows and SuSE 10.1.0 installed.
It has two Ethernet Adapters - eth0 (Realtek) and eth1 (Davicom)
In eth0 goes the ISP cable, that provides Internet for my windows and suse.
I use pppoe-start to authenticate with my ISP and make the connection.
eth0 is configured to receive automatic settings through DHCP
eth1 is configured as following:
IP: 192.168.1.1
Subnet Mask: 255.255.255.0
DNS: none
GW: none


On the other hand i have a laptop with windows XP installed and a singular ethernet adapter.
I have a switch that makes the connection between my PC's eth1 and the Laptop adapter.
When I boot my PC in Windows I use Internet Connection Sharing to provide Internet access to the Laptop and it works.

I want to make SuSE route the existing internet connection from eth0 to eth1 and from there to the laptop.

I tried different configs of eth1 in SuSE and echo 1 > /proc/sys/net/ipv4/ip_forward,
but nothing worked.

I cannot even ping my PC's eth1 IP (192.168.1.1) from the laptop when i am in SUSE.
The configuration of the laptop's Network card is like this:
IP: 192.168.1.2
Subnet Mask: 255.255.255.0
GW: 192.168.1.1
DNS: 192.168.1.1


Any ideas ?
 
Old 06-21-2006, 04:44 PM   #2
Unicron
Member
 
Registered: Feb 2005
Distribution: Ubuntu (Dapper)
Posts: 32

Rep: Reputation: 15
Are you certain that eth1 is being set up with those settings? On my machine I had to manually configure it to begin with.

Run ifconfig to check the setup of the interfaces.

If they are set up correct then maybe it is your firewall settings.

Last edited by Unicron; 06-21-2006 at 04:46 PM.
 
Old 06-22-2006, 03:00 AM   #3
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
im shure these are the settings.
It could be a firewall issue, but i dont know how to check...

Btw eth0 is set to External Zone in Firewall zone settings and eth1 is Internal Zone (Unprotected)
 
Old 06-24-2006, 10:11 AM   #4
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
i managed to disable the firewall through the YaST Control Center, but it didnt help....
 
Old 06-24-2006, 10:37 AM   #5
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
i managed to disable the firewall through the YaST Control Center, but it didnt help....
 
Old 06-25-2006, 02:23 PM   #6
Unicron
Member
 
Registered: Feb 2005
Distribution: Ubuntu (Dapper)
Posts: 32

Rep: Reputation: 15
In the terminal run
Code:
ifconfig
and paste the output, just to make sure your ethernet card is configured correctly. I presumed it would be correct when I set up my server but it has to be manually configured (which you can set up to be done on boot up).

Once we know this is correct then we can go through the various firewall settings

You could also try pinging the clients from the server. Make sure the windows clients firewall allow for traffic from the router too, Zone Alarm was a little over zealous for me when I first set up the server and blocked everything which was alittle sucky.
 
Old 06-25-2006, 07:51 PM   #7
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
Post ifconfig request

here is my ifconfig output:

Code:
eth0      Link encap:Ethernet  HWaddr 4C:00:10:00:34:AB
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2751 errors:0 dropped:0 overruns:0 frame:0
          TX packets:767 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:642981 (627.9 Kb)  TX bytes:134702 (131.5 Kb)
          Interrupt:11 Base address:0xe000

eth1      Link encap:Ethernet  HWaddr 00:08:A1:93:03:A9
          inet addr:192.168.0.1  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::208:a1ff:fe93:3a9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:313 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:38067 (37.1 Kb)  TX bytes:10073 (9.8 Kb)
          Interrupt:10 Base address:0xc000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:91 errors:0 dropped:0 overruns:0 frame:0
          TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6091 (5.9 Kb)  TX bytes:6091 (5.9 Kb)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:212.21.138.109  P-t-P:85.187.214.226  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:561 errors:0 dropped:0 overruns:0 frame:0
          TX packets:740 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:438641 (428.3 Kb)  TX bytes:116613 (113.8 Kb)
there is a firewall installed on the laptop (McAfee Personal Edition), but it's disabled..
what makes me sure about the firewall not messing up the whole thing is that the windows connection sharing works fine with it.
 
Old 06-26-2006, 01:37 PM   #8
Unicron
Member
 
Registered: Feb 2005
Distribution: Ubuntu (Dapper)
Posts: 32

Rep: Reputation: 15
eth1's IP address is 192.168.0.1 not 192.168.1.1 as you would like., at the prompt type
Code:
ifconfig eth1 192.168.1.1
That will configure the card to the address that you want.

Make sure you have already run
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
Now you should have the correct address and ip forwarding eneabled. Test the connection and/or ping each other to test if everything is working correctly.
 
Old 06-27-2006, 05:18 PM   #9
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
here is something strange:

when i ping yahoo.com from the konsole it says "ping: unknown host yahoo.com",
but when i try to reach the host from Firefox, yahoo pops up in a second.. so..
could this info be in any help for solving the problem above ?
 
Old 06-28-2006, 02:56 AM   #10
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Unicron
eth1's IP address is 192.168.0.1 not 192.168.1.1 as you would like., at the prompt type
Code:
ifconfig eth1 192.168.1.1
That will configure the card to the address that you want.

Make sure you have already run
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
Now you should have the correct address and ip forwarding eneabled. Test the connection and/or ping each other to test if everything is working correctly.

well, i changed my mind and desided that the IPs will be 192.168.0.1 for the router and 192.168.0.2 for the client laptop, because of the XP. It says that using 192.168.1.2 may cause some problems.

But it doesnt change the "shituation"... As i posted above i'm not able to ping neither hostnames as yahoo.com, nor internal IPs, like 192.168.0.2
 
Old 06-28-2006, 02:32 PM   #11
x86processor
Member
 
Registered: Jun 2006
Location: Chennai, India
Distribution: Embdebian, Debian, Fedora Core, Redhat, Slackware, Ubuntu.
Posts: 112

Rep: Reputation: 15
What is your route command output?
Code:
/sbin/route -n
This is my documentation:

http://www.shakthimaan.com/installs/bsnl-dataone.html
 
Old 06-28-2006, 03:12 PM   #12
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
thanks for the documentation, x86processor. now i post the route -n result and go read it

So.. result is:

Code:
cad:/etc/rc.d/rc5.d # /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
85.187.214.226  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         85.187.214.226  0.0.0.0         UG    0      0        0 ppp0
BTW
I was reading the following topic just before coming here:
http://www.linuxquestions.org/questi...d.php?t=452487

I'm more and more thinking that the problem is not in the ip tables, since
i cannot event ping my laptop's IP, nor i can ping hostnames like google.com !!!
The strange thing is that i can browse the net through my Firefox.
I see that the guy writing in the thread above is also using SuSE 10.xxx and i
think that it could be a distro bug or something. Is it possible ?
 
Old 06-29-2006, 02:09 AM   #13
zubir
LQ Newbie
 
Registered: Mar 2004
Posts: 28

Rep: Reputation: 15
What type of adsl modem/router do you have, is it a 4 port unit?
 
Old 06-29-2006, 02:28 AM   #14
proff
LQ Newbie
 
Registered: Jun 2006
Location: sofia
Distribution: SuSE 10.1.0
Posts: 15

Original Poster
Rep: Reputation: 0
here's the HW configuration:

Code:
ISP -------+      +-------------+  [== 8 port SWITCH  ==]               ..........
           |      |             |   (1) (2) 3 4 5 6 7 8               .         .
          \./    /'\            |    |   |                          .  LAPTOP .
      +--eth0---eth1--+         +----+   +----------------------> .         .
      |               |                                         ............
      |      PC       |
      |               |
      +---------------+



@zubir:
If you r asking for a device between my ISP and eth0 - there is no such thing.
I connect directly to the ISP Servers and use PPPoE to authenticate and connect
to the Internet. Otherwise (if i not start pppoe-connect) I am just visible to
the internal ISP LAN.

Last edited by proff; 06-29-2006 at 02:29 AM.
 
Old 06-29-2006, 04:46 AM   #15
x86processor
Member
 
Registered: Jun 2006
Location: Chennai, India
Distribution: Embdebian, Debian, Fedora Core, Redhat, Slackware, Ubuntu.
Posts: 112

Rep: Reputation: 15
Quote:
0.0.0.0 85.187.214.226 0.0.0.0 UG 0 0 0 ppp0
Looks fine. There is no GNU/Linux installed on your laptop? Not sure what command to check the route in windoze. But, its default route should be to your eth1. Check it.
Quote:
I cannot even ping my PC's eth1 IP (192.168.1.1) from the laptop when i am in SUSE.
What output/error message do you get when you ping from both ends?
 
  


Reply

Tags
network, route, routers, suse10


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
Setting up router (Linksys WRT54G v5) to connect to internet (SUSE 9.3) Jongi Linux - Networking 2 11-15-2005 01:33 PM
Problem with SUSE 9.3 router riffraph SUSE / openSUSE 1 07-21-2005 06:43 PM
Setting up PC as router, eth1 problem talking to modem NeXuS_2006 Linux - Networking 6 01-17-2005 01:23 PM
help! setting for connect internet via ADSL router(suse 9.1) mysurface Linux - Networking 0 10-21-2004 03:00 AM
problem setting up router in linux http server mkepler1 Linux - Networking 1 12-18-2003 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:38 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
Open Source Consulting | Domain Registration