LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 10-07-2002, 08:06 PM   #1
nerfherder64
LQ Newbie
 
Registered: Oct 2002
Location: Fort Wayne, Indiana USA
Distribution: Redhat 8.0
Posts: 9

Rep: Reputation: 0
NAT in Redhat 8.0


I have a cable modem and two Ethernet cards. eth0 is 192.168.0.1 and is connected to a hub, to which my other computer is also connected. Here are its settings:

Address: 196.168.0.1
Subnet Mask: 255.255.255.0
Default Gateway Address: 192.168.0.1


eth1 is connected to the cable modem and gets its IP address from DHCP.

The client computer is already set up correctly.

Now I can't seem to get NAT working to save my life. Can someone please tell me what I need to do? I've tried /sbin/iptables with various arguments, but nothing ever seems to get it working. I must be passing the wrong arguments somewhere along the way. I've searched Google a zillion times, and apparently nothing has been clear enough for me.

Thanks in advance.
 
Old 10-08-2002, 02:02 AM   #2
mwjcox
LQ Newbie
 
Registered: Oct 2002
Location: Kansas City
Distribution: Debian Sid
Posts: 15

Rep: Reputation: 0
It sounds like the same set up I have on my home network with a cable modem. I use the script from http://linuxselfhelp.com/HOWTO/IP-Ma...-examples.html web page. I put it into a file and make it excuteable, then run it. That should let all the computers run on the single modem.

Last edited by mwjcox; 10-08-2002 at 02:09 AM.
 
Old 10-08-2002, 07:44 AM   #3
nerfherder64
LQ Newbie
 
Registered: Oct 2002
Location: Fort Wayne, Indiana USA
Distribution: Redhat 8.0
Posts: 9

Original Poster
Rep: Reputation: 0
Good example. Thanks.

Unfortunately, it's still not working. As it turns out, my computers aren't even seeing each other under Linux. They fail to ping each other. I tried resetting my hub, but that didn't help. They work fine under Windows XP (and Internet connection sharing works).

The client's IP (192.168.0.2) is set manually, not by DHCP. I can't imagine why RH won't see it (or vice versa). Any ideas?
 
Old 10-08-2002, 02:42 PM   #4
Risc91
Member
 
Registered: Jan 2002
Location: Macomb, MI
Distribution: Ubuntu|Red Hat ES|AIX
Posts: 161

Rep: Reputation: 30
are all of your computers within the same subnet? (e.g. 255.255.255.0)
 
Old 10-08-2002, 03:24 PM   #5
nerfherder64
LQ Newbie
 
Registered: Oct 2002
Location: Fort Wayne, Indiana USA
Distribution: Redhat 8.0
Posts: 9

Original Poster
Rep: Reputation: 0
Yes, the settings on the client computer are identical to those I listed for eth0 except for the IP address.
 
Old 10-09-2002, 06:15 PM   #6
mwjcox
LQ Newbie
 
Registered: Oct 2002
Location: Kansas City
Distribution: Debian Sid
Posts: 15

Rep: Reputation: 0
You have a dedicated nic for the local lan - properly 192.168.0.1 on the host. If you are using static (hard coded) IP address on the other computer, make sure the gateway is 192.168.0.1 on those computers with the same submask address (usually 255.255.255.0 ) .

I use hardcoded address on all the computers and I had to hardcode the DNS(Domain Name Server) on the client computer to make them work on the internet. You can get those addresses from the host computer that on the internet.
 
Old 10-09-2002, 10:40 PM   #7
nerfherder64
LQ Newbie
 
Registered: Oct 2002
Location: Fort Wayne, Indiana USA
Distribution: Redhat 8.0
Posts: 9

Original Poster
Rep: Reputation: 0
I've done all that. Unfortunately, a simple *ping* doesn't even produce any results. I don't understand it, since it all works under Windows. Oh well. I may just have to give up and buy a router. (It's either that or reboot into Windows whenever my wife wants to use the Internet.)
 
  


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
Redhat 8 NAT Jek Linux - Networking 1 02-11-2004 10:13 PM
NAT with Redhat.. injun Linux - Networking 5 10-24-2003 08:28 PM
Redhat 9 NAT problems ninjaz Linux - Networking 1 08-13-2003 08:01 PM
openH323 module still doesn't work on my RedHat 7.2 NAT server... yuzuohong Linux - General 1 12-21-2002 10:53 AM
Redhat 7.2 and Redhat 7.3 NAT,Netfilter and Iptsable guanyu Linux - Networking 1 06-21-2002 07:38 AM

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

All times are GMT -5. The time now is 08:35 AM.

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