Find the answer to your Linux question:
Results 1 to 6 of 6
First of all i have to apologize, I'm sure i can get the answer somewhere frm the internet, ive search for 2 days for this question and i'm really exhauted ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5

    Internet Sharing..


    First of all i have to apologize, I'm sure i can get the answer somewhere frm the internet, ive search for 2 days for this question and i'm really exhauted for being disapointed, pls pls help me team, i'll be vry appreciate upon the support, thanks..

    U guys know about internet sharing in Windows XP rite?
    the setup just need to run a wizard to determine the realted PC....
    now the situation is:

    Ubuntu (main Pc which connect to the broadband)
    Window XP (another PC which connect to the internet thru Ubuntu)

    no router, just linkin between 2 network cards
    network card is fine and can be activate (dhp0/dhp1)

    I hope ive make the situation clear and easy to understand

    So wht should i do to let the Win XP share the internet connection with Ubuntu?

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    You just have to route all the traffic to your second pc, that's what I know. Set up the firewall like that I think.

    Is the pc directly connected to the internet always on?
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5

    ??

    Quote Originally Posted by borromini
    You just have to route all the traffic to your second pc, that's what I know. Set up the firewall like that I think.

    Is the pc directly connected to the internet always on?
    Not sure wht are u talkin about :P
    well, ya, my Ubuntu is connected to broadband all the time

    wht do u mean "route all the traffice to my Window XP"? and how?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Easiest to use static IPs instead of dhcp with only 2 boxes. Then you need to create a "route" for the XP machine. Finally you need to set up the firewall (iptables) for forwarding and NAT. If you had a "friendly" firewall like Firestarter, that part would be pretty easy once you know what IP address your XP is on. And with a static IP that's easy.

    Edit /etc/hosts to add:
    192.168.0.1 yourubuntuhostname
    192.168.0.2 yourxphostname


    Assuming the XP machine is on eth1, do:
    ifconfig eth1 netmask 255.255.255.0 192.168.0.2

    Set the XP machine for static address 192.168.0.2 and netmask 255.255.255.0

    route add -host 192.168.0.2 netmask 255.255.255.0 eth1

    Do: 'route -n' and see that you have routes for:
    127.0.0.0 loopback interface lo
    192.168.0.2 XP machine through eth1
    0.0.0.0 default gateway through eth0

    And the hard part: set your firewall for NAT and forwarding to 192.168.0.2

    Read the man pages for all commands before executing them. Ifconfig and route are not persistent: they will be reset on reboot unless certain boot scripts are edited. Of course, editing /etc/hosts is persistent until you un-edit it. This is just one way of doing it which I think will work. there are many variations that may work.
    /IMHO
    //got nothin'
    ///this use to look better

  6. #5
    Just Joined!
    Join Date
    Jul 2005
    Posts
    16
    okay just read throught that and not sure i understand, i think i have a similar problem so i hope people dont mind me popping a little question in here?
    my setup-
    XP box always connected to the internet through an ADSL modem, the connection is shared and the XP box's address is 192.168.0.1 subnet is 255.255.255.0

    Fedora core box is connected via a cross over cable, no router its addres is 192.168.0.2

    i have gone into various settings on the linux box and they all tell me the connection is active yet i cant seem to get onto the internet through it? when i type in a web addy in a browser it just tells me im not connected?

    any ideas what i need to do? i have been searching but pretty much everything i can find talks about the linux box being the one with the internet connection!

  7. #6
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Yeah, bread_stick_2001, I think most mixed rigs have Linux at the Internet connection mostly for its firewall and other configurability, like routing, DNS, etc. In fact I've heard that Windows has had some security bugs.

    The problem is not likely in your Linux box. You need to configure (if it's possible) "IP forwarding" and "network address translation" ("NAT") on your Windows box (the "gateway"). With that, when your Linux box tries to access the Internet, the Windows box will receive the packet, change the header so it appears to come from the Windows box and send it along. When it receives a reply, the Windows box would un-change that header and pass it back to the Linux box. That's all in a day's work for a Linux box.

    I don't know Windows, but it may just be a problem with Linux finding a nameserver? What if, on the Linux box you do 'ping 216.239.39.99'? (that's a Google address) If you get a response that goes on and on (do 'ctrl-c' to stop) that means you have an internet connection but you aren't resolving the domain names.
    /IMHO
    //got nothin'
    ///this use to look better

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •