• Software
  • How to establish internet sharing between SUSE and XP

hey,
I installed SUSE 10.1 a few days ago, completely new ground for me, but no harm from testing. Till now i managed through but i'm facing one problem, below is my system graphics:

1-DektopPC:
OS: SUSE 10.1 (KDE)
Hardware: AMD 2400 , 512 MB DDR etc,
Network card: 1- Built in (eth0); 2- Realtek (eth1)

2-Laptop:
OS: WinXP home edition
Hardware: intel centrino .....

Internet: GDS wireless broadband, IDM client

some facts:
Internet works fine on Eth0
Internet works fine if internet plugged directly to Laptop
Eth1 responds to a ping from Laptop if directly connected
Firewall properly configured: Eth0: external zone, Eth1: internal zone, WinXP: Firewall off

Problem:
Laptop does not access the internet if the later was hooked to Eth0 and laptop to Eth1.

there are numerous guides on the net i found in the last couple of days but using hubs and switches. Cant I just create a simple gateway between both PCs?
Is the IP of your Linux PC set up as gateway on your Laptop?
Plz give me the whole networking configuration on your laptop, just do a "ipconfig /all" and paste the results here
Also give the IP of eth1 on your linux, type "ifconfig eth1"
Also give me the result of:
"more /proc/sys/net/ipv4/ip_forward"
on your linux box plz
EDIT:

Windows IP Configuration

Host Name . . . . . . . . . . . . : Laptopx
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Mixed
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Netwoork:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Eth
ernet NIC
Physical Address. . . . . . . . . : 00-0F-B0-A8-83-4E
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : EDIT EDIT EDIT (check below "next post")
Subnet Mask . . . . . . . . . . . : EDIT EDIT EDIT (check Below)
IP Address. . . . . . . . . . . . : fe80::20f:b0ff:fea8:834e%8
Default Gateway . . . . . . . . . : EDIT EDIT EDIT (check below)
DNS Servers . . . . . . . . . . . : EDIT EDIT EDIT (check Below)
EDIT EDIT EDIT
fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : FF-FF-FF-FF-FF-FF-FF-FF
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : fe80::5445:5245:444f%4
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter Automatic Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Automatic Tunneling Pseudo-Interface

Physical Address. . . . . . . . . : 0A-89-AF-C2
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : fe80::5efe:10.137.175.194%2
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Disabled




Eth1 IP: 192.168.0.1

result of "more /proc/sys/net/ipv4/ip_forward" on Linux box is: 1
oh i forgot, i'm using the internet on the laptop, so the ipconfig results are not the results that were supposed to come up if it was linked to the linux box, i use the follwing:
IP:192.168.0.2
subnet mask: 255.255.255.0
default gateway: 192.168.0.1

do u need me to "Ipconfig /all" again using those settings?
Looks good but you did not give me any DNS for the laptop.
To check if it's a DNS problem you can try to open pages by IP, for example:

google.com:
http://64.233.187.99/

msn.con:
http://207.68.172.246/

(try it from the laptop when the internet is connected to linux :) )

You need to set up the DNS on the laptop at the same value then on the linux box (for the GDS connection) . If there is a DNS forwarder on linux then you can also set it to the IP of the linux box. Try both.

Othewise your settings looks good to me. If it still doesnt work after that, it may be a firewall issue.
If you want I can take a look at your firewall if you post the results of "iptables-save"
But first check the DNS settings.
thanks mate.. it works like a charm wohooooooooooooooooooooooooooo, u just blew down the drain 2 days of forum readings, but what can i say, didnt even know what Yast is a couple of days ago:D

now is there a way to install adope photoshop cs2 and dreamweaver 8 without the need to install windows XP and run wine... coz from what i understood, in order to run Wine, i gotta have windows also ?
Zino wrotethanks mate.. it works like a charm wohooooooooooooooooooooooooooo, u just blew down the drain 2 days of forum readings, but what can i say, didnt even know what Yast is a couple of days ago:D
So what was it, DNS?
Zino wrotenow is there a way to install adope photoshop cs2 and dreamweaver 8 without the need to install windows XP and run wine... coz from what i understood, in order to run Wine, i gotta have windows also ?
I dont know about that. Wine works fine on mac OSX without having to install windows... I dont think you need to.
Alternatively you can try to use a virtual machine to run windows within Linux using Qemu with the qemu accelerator (otherwise it's too slow)
http://fabrice.bellard.free.fr/qemu/
Never tried it though and I hear that it's hard to install
You may want to try XGL + Compiz it's a great desktop enhancement

Be warned
That thing is still experimental (version 0.0.something, I think :D ) and it requires good hardware (check requirements on google) and works only with nvidia graphic adapter I think, and may break your system.

Since you're a newbie I do not recommend you install it, but since I wrote this post, I'm not throwing it away :)
Here you go:
http://www.novell.com/coolsolutions/feature/17174.html

Here are videos of xgl/compiz in action:
http://www.youtube.com/watch?v=cNNU_4-yVNM&search=compiz%20suse
http://www.youtube.com/watch?v=AtaLX9fYPr8&search=compiz%20suse

(bit shakey video, yeah :) )
yes it was a DNS issue, i tried to do this yesterday but i was trying "ya rabbi tigui fi 3ayno" :P and missed a string somewhere until u guided me through.

now another factor that made this work is the fact i disabled the dreaded Knetwork manager, but, my bro reactivated it by mistake and now it doesnt seem to close anymore using #sudo ifdown eth0 #sudo ifup eth0, so currently scanning the various forums for a different way to kill this thing and still keep both Eth0 & 1 up and running AND fix the other issue that recently arised: the constant GDS main login screen poping up, it was a ICMP issue back on XP, faced it on SUSE also yesterday when the firewall was accidentally set to Internal zone for Eth0, now i cant seem to diagnos the problem causing that.

as for Wine, as u said, since i'm a newbie, i prefer not to venture into new grounds coz already i'm there :D so as soon as i get a grip on SUSE's KDE, and start thinkin out of the box (after working too many years on windows, your TechBrain will be thinking windows while working on linux ;) ) then i'll give xgl/compiz a try.

as for now, i would appreciate a good link to a step by step Wine configuration and tutorial without the need to install windows on the other hand (coz i found several tutorials but all require windows)

Speaking of thinkin "out of the box", is there also a comparison chart XP vs SUSE, for example: XPs Control Panel is Yast in SUSE, and so on ... already know the standard Appz like the office and so on, but the other deeper stuff are confusing like installing a new software, extensions and their meanings, computer maintenance, drivers installation (already did the Nvidia one and its cumbersome :S)

Thank you for ure help,
Regards
Zino
Zino wroteyes it was a DNS issue, i tried to do this yesterday but i was trying "ya rabbi tigui fi 3ayno" :P and missed a string somewhere until u guided me through.

now another factor that made this work is the fact i disabled the dreaded Knetwork manager, but, my bro reactivated it by mistake and now it doesnt seem to close anymore using #sudo ifdown eth0 #sudo ifup eth0, so currently scanning the various forums for a different way to kill this thing and still keep both Eth0 & 1 up and running AND fix the other issue that recently arised: the constant GDS main login screen poping up, it was a ICMP issue back on XP, faced it on SUSE also yesterday when the firewall was accidentally set to Internal zone for Eth0, now i cant seem to diagnos the problem causing that.
Zino wroteThank you for ure help,
Regards
Zino
What's that Knetwork thingie and whats the deal with it?

Anyway if you want to kill a process:
ps -aux
(to list all processes)
then
kill 12345
and if it doesnt work
kill -u 9 12345
(1235 is the process id. 9 is the kill without pity signal)

Not sure about these switches, if you have trouble take a look at the man for ps and kill
Ah and for the GDS I have a little PHP script I can post it here, hold on
Ok i'm not gonna post it now, coz it actually involves 2 scripts and some config
I'll package it and document it and post it some day
what that thing does is log you in or off gds and tell you if your connected or not
You can call it from a cron job to stay logged in all the time
i hope u can give me that script soon, coz its so Freekin annoying to have that page pop up every now and then ! usually it is caused by 2 things:
1- ICMP issue
2- having a spyware or virus on the pc

now that my gateway is linux, where should i fix those ICMP options. and i doubt i have a spyware or virus already on linux :P
I dont understand you.
The GDS script usually pops up when your connection times out.
What is this ICMP issue you are talking about? And what does it have to do with spyware/virus? Who told you that :) ?
Alternatively you can have a small script that opens a page every minute or does and HTTP ping or something like that just to keep the connection alive.
well on WinXP, if u had IDM wireless broadband, u have to "tick" in the ICMP settings the: "allow incoming echo request" and "allow incoming timestamp request" so that the GDS (cisco) login page does not pop up while surfing, coz if u dont do that, u'll get that ugly page whenever ur idle for more than 5 minutes.

now this syndrome started to occur again after i installed the linux, not from the beginning though, as soon as the gateway between the linux box and the laptop worked.

as for the spyware thingy, if u get that GDS page popping up in front of u too much, it usually mean u have either a virus or a spyware that IDM firewall or whatever recognizes it. coz sometimes, i get some sywares (temporarily until i installed kaspersky (6)) and the GDS page keeps popping up.

PS: those "supposed to be" customer support in IDM are hilarious.... u should hear them babbling when i call them asking for some help configuring the internet on Linux... hehehe they went like :|, we dunno how to work on linux,,,, what are they for then ? :d
That's weird coz I have always had incoming icmp on my linux box and it still did this problem with me.
Now I dont have this problem coz the gds script automatically keeps me logged in all the time.
Yet I have doubts about this ICMP thing.

Anyway try this on your linux box to keep the connection alive:
First you need to create a cron dir that will be executed every minute:
mkdir /etc/cron.every_minute
now type
 nano /etc/crontab
and edit the file to enable that dir. You should add the line
* * * * * root run-parts /etc/cron.every_minute
just over the cron.hourly line
Now close and save (Ctrl-X and Y)

restart cron to activate the changes:
service crond restart
or
/etc/init.d/crond restart
Now you have a directory /etc/cron.every_minute
and whatever script you put in that directory will be executed every minute.


Now we want to add there a little script that will ping some address and see if that will keep the connection alive:
nano /etc/cron.every_minute/gds_keepalive
and paste the following in the file:
#!/bin/bash
ping www.google.com -c 1 -W 1
Close and save.
Now we need to make that script executable
chmod +x /etc/cron.every_minute/gds_keepalive
Now we can execute, let's test it just to see if it works :)
Just type /etc/cron.every_minute/gds_keepalive

This is what I get:
PING www.l.google.com (216.239.37.104) 56(84) bytes of data.

--- www.l.google.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
Now your linux should be sending one ping packet to www.google.com every minute.
It's okay ping is blocked but maybe it will still reset the gds timeout counter.Try it and tell me if it works.

Btw if you want to test the cron.every_minute directory that we added (hey maybe we did something wrong) then you can put another script il it, with the following contents:
#!/bin/bash
wall this is a test message
and make it executable (chmod +x ...)
Now this should pring "this is a test message" to all console windows every minute.

Tell me if that helps to keep your gds connected. If not I can give you a perl script instead of the little ping thing that will open a page instead of just pinging.
i did evrything what you said but still nothing every 2 or 3 minutes i have to login again.

P.S: at first, when i installed the linux i didnot have this problem, it worked just fine but when i managed to share the internet connection, this problem started to happen. do you it have to do something with it?
i think the gds is timing out after less then a minute so the cron.every_minute aint goin to help, what are the changes that i should make to make it every 10 or 30 seconds?
Zino wrotei think the gds is timing out after less then a minute so the cron.every_minute aint goin to help, what are the changes that i should make to make it every 10 or 30 seconds?
Impossible, mine is on 1 minute and it never times out.
Did you try the wall thing to see if the cron setup is working?
If not then a ping might not be enough to keep the connection alive

Anyway, please do the wall thing and tell me if it works. If it works (ya3neh there's no prob with cron) , then try to put that script in the cron.every_minute. Call it gdscheck and dont forget to chmod it +x.
#!/usr/bin/perl

# it will try to connect to google.com and return:
#            success if reachable and string "Google Search" found on page
#            failed  otherwise
#


use strict;
use warnings;
use LWP::Simple;

if(is_success(mirror("http://www.google.com" , "foo"))){
        # Small hack since we're using google
        # will check the content for "Google Search"
        my $content = get("http://www.google.com");
        my @arr = split "\n", $content;
        my $found=0;
        foreach(@arr){
                if(/Google Search/){
                        $found=1;
                }
        }

        if($found==1){
                print "success\n";
        }else{
                print "failed\n";
        }
}else{
        print "failed\n";
}
Otherwise if you still have the prob, then it may be because of spyware or virus on your laptop, which is also probable since you say that it starts when you connect your laptop.
that is what i get when i run the wall thing i dont know what it means though:
usage: wall [file]
and about the script you gave me it didnot solve the prob, im goin to check if i have any spyware or virus.
Zino wrotethat is what i get when i run the wall thing i dont know what it means though:
usage: wall [file]
and about the script you gave me it didnot solve the prob, im goin to check if i have any spyware or virus.
Maybe you mistyped it.
Anyway plz do this for me and give me the results (if you want me to help):
which bash