LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-21-2005, 10:48 AM   #1
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Rep: Reputation: 15
Networking via Crossover- Not sure what I did wrong?


I've been using Linux for awhile, but I've only had one machine... so I admit, I'm a total newbie all over again when it comes to networking. I'm trying to get my Slackware box to share the cable connection with a WinXP machine. Here's what I've done thus far:

Made rc.ip_forward executable.

In /etc/inetd.conf (sp?), I manually set up eth0 and eth1. I made eth0 DHCP enabled and left it alone, as that is the external connection. On eth1, I gave it an IP of 192.168.0.1, mask of 255.255.255.0, and put in my ISP's DNS as the nameserver.

On the WinXP machine, I configured it's NIC to have an IP of 192.168.0.2, gateway of 192.168.0.1. ISP DNS server for Primary DNS.

I couldn't ping one way or the other. Then I found that Slack wasn't seeing eth1 (a Marvell Yukon Gigabit onboard), so I dug around and found it needed a module. Did a modprobe sk98lin, and voila! The NIC was seen and I could ping my XP machine from Slack, and the Slack machine from Windows. Added that to rc.modules.

Okay, so now I've got all NICs manually set up, the module added to startup, so now I needed the NAT script in rc.local. Using Pat's example in rc.modules, I put in the following:

Code:
EXTERNAL=eth0
INTERNAL=eth1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "Setting up NAT (Network Address Translation)..."
iptables -P FORWARD DROP
iptables -A FORWARD -i $EXTERNAL -o $INTERNAL -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTERNAL -o $EXTERNAL -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE
With everything I've read, it seems like all this should work. However, when I rebooted, the Marvell Gigabit was dead (no activity whatever, even though the module loaded), and I could no longer even get to the internet from Slack as I could before making the changes.

Not sure what I'm missing here? If anyone has any help to offer, it'd be greatly appreciated. As a note, there's no X on this install, I installed Slack 10.1 with only the necessities of /a, /ap, /k, /n so I can learn more doing everything manually.

Last edited by Makaelin; 02-21-2005 at 10:49 AM.
 
Old 02-22-2005, 09:41 PM   #2
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
Can you ping each other now?

To check your iptables is loaded correctly
Code:
iptable -L
I found your problem.

You need to be explicit about the location of iptables

/usr/sbin/iptables

instead of just iptables

Your PATH have not been loaded before you login.
 
Old 03-07-2005, 10:48 PM   #3
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Just an update, in case my idiocy helps anyone else.

I found the problem. Slackware swapped the NICs around upon reboot (eth0 became eth1, vice versa). I hadn't even thought about it doing that on it's own.

So, I'm a fool. Everything else I had done was correct.
 
Old 07-04-2005, 03:47 PM   #4
thick_guy_9
Member
 
Registered: Jan 2004
Location: Singapore
Distribution: VMS, CentOS
Posts: 109

Rep: Reputation: 16
Hello Makaelin
would you mind sharing (a detailed how-to would be most welcome) how you did this? Also can you add Linux-Linux configuration?

Thx
 
Old 07-26-2005, 10:04 PM   #5
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Everything I did is posted above, actually. Just in the end, I had to swap eth0 and eth1 in the EXTERNAL and INTERNAL parts. Hope this helps!

EDIT : Just read through my post again in detail and realized that it's probably not very helpful if you're as clueless as I was when I started learning how to do all that. I'll try and go back over my steps again and post a detailed HOWTO tomorrow!

Last edited by Makaelin; 07-26-2005 at 10:07 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run CrossOver 3 and Crossover 4 at the same time? xbaez Linux - Software 2 05-11-2005 10:16 PM
Linux networking noob: What am I doing wrong? lectraplayer Linux - Networking 2 02-02-2005 07:27 PM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 12:46 AM
Trouble networking two Linux computers (via crossover cable) lrt2003 Linux - Networking 3 06-29-2004 09:06 AM
networking mandrake to windows via ethernet crossover cable happyoutkast Linux - Networking 9 05-07-2004 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration