LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem with setting up my SuSE as router (https://www.linuxquestions.org/questions/linux-networking-3/problem-with-setting-up-my-suse-as-router-457004/)

proff 06-21-2006 02:02 PM

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 :) ?

Unicron 06-21-2006 04:44 PM

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.

proff 06-22-2006 03:00 AM

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)

proff 06-24-2006 10:11 AM

i managed to disable the firewall through the YaST Control Center, but it didnt help....

proff 06-24-2006 10:37 AM

i managed to disable the firewall through the YaST Control Center, but it didnt help....

Unicron 06-25-2006 02:23 PM

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.

proff 06-25-2006 07:51 PM

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.

Unicron 06-26-2006 01:37 PM

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.

proff 06-27-2006 05:18 PM

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 ?

proff 06-28-2006 02:56 AM

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

x86processor 06-28-2006 02:32 PM

What is your route command output?
Code:

/sbin/route -n
This is my documentation:

http://www.shakthimaan.com/installs/bsnl-dataone.html

proff 06-28-2006 03:12 PM

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 ?

zubir 06-29-2006 02:09 AM

What type of adsl modem/router do you have, is it a 4 port unit?

proff 06-29-2006 02:28 AM

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.

x86processor 06-29-2006 04:46 AM

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?


All times are GMT -5. The time now is 08:35 PM.