Find the answer to your Linux question:
Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Linux - Windows LAN Networking Help


    Im trying to setup a LAN connection between my linux box and my windows box. I have the linux box hooked up to the DSL router and a crossover cable connected to the windows computer. I setup internet connection sharing on the windows computer but theres still no connection to the internet. If you need more information just ask. Thank you for your help.

  2. #2
    Linux Engineer
    Join Date
    Dec 2002
    New Zealand
    if the router is plugged into the linux box, all the windows 1 needs to do is set its gateway ip to the local IP of the linux box, and maybe set its dns up.

    can the linux box already connect to the net fine? if so then u need to run
    (assuming eth0 is ur LAN connection and eth1 is to the router.)

    iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
    iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
    iptables -A FORWARD -j LOG

  3. #3
    ok i entered the commands in the terminal but since im such a newb at this, i cant seem to find out how to change the default gateway on the windows computer to the IP address of the linux computer. and how would i find out my IP address for the linux computer?

  4. $spacer_open
  5. #4
    Just Joined!
    Join Date
    Jul 2004
    Berea College
    I don't know how to check your IP in linux but if you go to this address:
    they will check your IP, plus it is super easy.

  6. #5
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Lat: 39:03:51N Lon: 77:14:37W
    hsimpler way,
    will show you linux ip, then on windows (auuughh god it BURNS im right click on the network connection, properties. then one of those tabs will have a field for default gateway.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  7. #6


    OK , Ive been trying to get the Linux computer and the Windows computer to talk to each other for about a week now. and no luck. Below i gave a detailed description of my problem.


    OK ive been trying this for weeks now and havent come up with sucess yet. this is what I've tried. I configured my ethernet card with the IP of and a subnet mask of (here's a picture just to show you ( ) and under ROUTING, i put my default gateway as (my router) and i enabled IP forwarding. ( ). I also filled some stuff out in the Host Name section but i really didnt know what i was doing there ( ) And on the windows computer. I went to my LAN configuration and put as the IP. I put as the subnet mask. and as the default gateway i put (the NIC in my linux box) . And I put in the DNS servers provided by my ISP.(PICTURE: ) (Note: In my Linux box, i have to ethernet cards. one that goes to the router. ( and the one connected to the windows computer ( OK, thats all the info i have to give you now. If you need more info you can post on here or email me at


  8. #7
    Ok, can your windows box ping your linux box? Youve checked the basic things, I.e your not using a straight through cable correct? Why did you enable port forwarding? Sounds to me like your trying to tackle several issues at once, and causing yourself a lot of grief.

  9. #8
    Just Joined!
    Join Date
    Apr 2003
    Bucks, UK
    I'm no great expert, but why don't you buy a hub and set up your windows machine to connect to the DSL router directly. I think the Windows Internet Connection Sharing is a bit of a red herring, because it isn't the Windows machine that's doing the sharing.

  10. #9
    I just set up an equivelent network last week. I used Shorewall and followed the 2 interface instructions and it just worked. At least to connect to the internet.

    I installed Samba to allow file sharing and found some iptable commands for shorewall by searching the Shorewall web site with the keyword, Samba.

    Good luck.

    Oh, make sure you use the settings for pppoe which I presume you use with your dsl.


Posting Permissions

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