SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got Slackware 10.0 up and running. All that's fine and dandy, configured eth1 for DHCP, internet works. Now I have a cross-over cable running from eth0 to a windows XP box three feet away. I can't change that box to linux too, cause the rest of my family uses it and they can't even program a VCR.
I'm not worried about printer/file sharing, I just want to get both computers to share the internet connection. I've tried forcing eth0 to use 192.168.0.1 and then setting that as the gateway for the windows box. I've tried setting up routes through different IPs. I just don't understand networking well enough to get this to work.
Any help is greatly appreciated. Last night was my fifth or sixth night staying up so late it's early trying to figure this out.
Well there is quite a bit to sharing an internet connection.
If you don't want your Linux box to be a DNS forwarder, then life gets a little easier.
you will have to have IP forwarding enabled by typing
echo 1 > /proc/sys/net/ipv4/ip_forward
if you did it right, typing cat /proc/sys/net/ipv4/ip_forward should give you one line with 1 on it.
then on the XP box, make sure you have the proper dns settings setup to point to your ISP's DNS servers (not the 192.168.x.x address) and your gateway is your Linux box.
Now when they access the internet, all requests going to 0.0.0.0 (outside your network) will go to the gateway (linux box) and will just forward all packets from eth0 to eth1.
Followed your directions, still didn't work though . I previously had my outgoing connection connected to eth1, but I switched it since it seems like linux wants to use eth0 for the internet anyway. I got eth0 set up using dhcp, and typed 'ifconfig eth1 192.168.0.1' and then set that as the gateway for my windows box. I set the IP for the Windows box to 192.168.0.24 and I'm not getting any packets received. I've tried using direct IPs, as well as URLs and can't ping anything.
I think you'll need to setup NAT. You can do that using an iptables script. 2 reasons for that:
- the internal IP of the Windows box has to be translated to an external address to work on Internet
- You don't want to connect a Windows machine directly to the Internet without a firewall and risking virus/trojan infection within a few minutes.
So perform a search on firewall/iptables and you will find plenty of solutions to that problem
zeekx4- have you set the same netmask for both XP box and Linux?
ifconfig eth1 netmask 255.255.255.0
pinging is the best tool to test connectivity at first so don't try the internet until we get that resolved.
try posting your configs online .. like type 'route -n' & 'ifconfig'
you can set your IP manually in the /etc/rc.d/rc.inet1.conf file to make it easier..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.