Jump to content

ICS, Mandrake, and XP


Guest ions
 Share

Recommended Posts

Guest ions

I'm sorry to post this as I know it's a common topic. I have searched an read through a lot. I've done the same on other forums as well but I can't seem to find a working resolution to this.

 

I want to share a cable modem connection between 2 machines.

 

Machine 1 is running Mandrake 9.1 with KDE 3.1. It's the machine that the Cable modem is connected to. It has two NICs as I used to successfully share the internet connection when this machine was an XP machine.

 

Machine 2 is running XP and is connected to the 2nd NIC of Machine 1.

 

What I've done so far to try and get this to work:

 

I've been using the Mandrake Control Center to try and configure this and have so far been unsuccessful. When I installed Mandrake 8 days ago I let it automatically configure my internet connection using Drakconnect and other than occasionally hanging on eth0 during bootup it works well.

 

So since that worked fine I thought I'd use DrakGw to configure ICS. That was a disaster! Not only was I not able to connect Machine 2 to the net I lost my connection on Machine 1. After a couple hours of fumbling I managed to undo whatever had been done.

 

How do I do this? So far my luck with Linux has been horrible and nothing has gone well but I really want this to work! If there's a thread or FAQ that can answer my question and I've missed it please post it up.

Link to comment
Share on other sites

Ok, I'm assuming that the ethernet card attached from Linux to WinXP is eth1. This is how mine is set up. On Linux, I have a script that I had to create in /etc/sysconfig/network-scripts called ifcfg-eth1. It looks like this:

DEVICE=eth1

BOOTPROTO=static

IPADDR=192.168.0.1

NETMASK=255.255.255.0

NETWORK=192.168.0.0

BROADCAST=192.168.0.255

ONBOOT=yes

 

Then go to your XP box and do the thing in there to make sure that it gets its ip from dhcp and that the netmask is 255.255.255.0. If you need specific details on this part, let me know, cuz I'll have to go downstairs and look...been a long time since I actually worked in windows.

 

Here is what my /etc/dhcpd.conf looks like (look for things inside [ ] that you'll have to change to suit your situation and of course things like myhostname.com....don't actually use the [ ]s, though...lol):

ddns-update-style none;

option broadcast-address 192.168.0.255;

option subnet-mask 255.255.255.0;

option netbios-name-servers 192.168.0.1;

option routers 192.168.0.1;

option domain-name "myhostname.com";

option ip-forwarding on;



# option definitions common to all supported networks...

option domain-name "myhostname.com";

option domain-name-servers [my isp's first dns server],[my isp's second dns server];



default-lease-time 1600;

max-lease-time 7200;



# If this DHCP server is the official DHCP server for the local

# network, the authoritative directive should be uncommented.

authoritative;



# Use this to send dhcp log messages to a different log file (you also

# have to hack syslog.conf to complete the redirection).

log-facility local7;



# No service will be given on this subnet, but declaring it helps the 

# DHCP server to understand the network topology.



subnet 192.168.0.0 netmask 255.255.255.0 {

ddns-updates on;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.0.255;

option routers 192.168.0.1;

option domain-name "myhostname.com";

option domain-name-servers [my isp's first dns server],[my isp's second dns server];

option ip-forwarding on;

}





host MyWinXP {

ddns-updates on;

## You get the MAC address from doing 'ifconfig eth1' as root in a console (without the quotes)

       hardware ethernet [my:eth1:HWaddr];

fixed-address 192.168.0.2;

option broadcast-address 192.168.0.255;

option routers 192.168.0.1;

option domain-name-servers [my isp's first dns server],[my isp's second dns server];

option domain-name "myhostname.com";

option ip-forwarding on;

}

 

The global section, the subnet section, and the host section are basically redundant on my setup, but I thought you should see two variations on how to do it. Then you'll need a script to run iptables or whatever to do masquerading. I use bastille-netfilter because it is easy to set up. If you want to use Bastille and need specific info, then I can post that. If you want to use something else, you'll have to get someone else to help on that part. HTH

Link to comment
Share on other sites

Guest ions

I've yet to try that solution Steve but in the interim DrakGW has decided to ignore me. Everytime I start the machine I have to go in and disable it. Everytime it starts enabled. Why is my setting not being remembered?! With it enabled my internet does not work.

Link to comment
Share on other sites

I don't know why your setting is not being remembered, but try this as root in a console:

 

chkconfig --del drakgw

 

If that doesn't work, do a

 

chkconfig --list

 

and see if maybe the name is a little different (it's case-sensitive). It also might be listed as a service run by xinetd, so you can go into /etc/xinet.d and delete the link to it in there if it is.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...