LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2004, 11:19 PM   #1
linuxdoctor
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
Question Problem routing between 2 nics


I have two linux boxes running Fedora Core 2.

Box A has two nic's installed.
Eth0 is connected to a cable modem and configured via DHCP from the ISP.
Eth1 is connected bia a crossover cable to Eth0 on Box B.

Box B has one nic installed.
Eth0 is connected to Box A via crossover cable to Eth1 on Box A
Eth0 is configured via DHCP running on Box A.


From Box A
Everything works fine.
I can connect to the internet via cable modem.
I can ping Box B

From Box B
Obtains IP from DHCP on Box A just fine.
I can ping Box A
DNS on Box A returns proper IP address when pinging yahoo
ping fails to see anything other that IP for eth1 on Box A


PROBLEM:
Box B will not connect to the internet
Box A is not routing

IP_FORWARDing is turned on.


HELP. Been two days working on this!




ifconfig output:

eth0 Link encap:Ethernet HWaddr 00:0BB:29:AB:96
inet addr:68.118.98.204 Bcast:255.255.255.255 Mask:255.255.240.0
inet6 addr: fe80::20b:dbff:fe29:ab96/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23048 errors:0 dropped:0 overruns:0 frame:0
TX packets:875 errors:0 dropped:0 overruns:0 carrier:4
collisions:0 txqueuelen:1000
RX bytes:1898829 (1.8 Mb) TX bytes:124841 (121.9 Kb)
Interrupt:5

eth1 Link encap:Ethernet HWaddr 00:50:04:7D:47:26
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:4ff:fe7d:4726/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2046 (1.9 Kb) TX bytes:1950 (1.9 Kb)
Interrupt:11 Base address:0xc000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2125 errors:0 dropped:0 overruns:0 frame:0
TX packets:2125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2182705 (2.0 Mb) TX bytes:2182705 (2.0 Mb)


route -n output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
68.118.96.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 68.118.96.1 0.0.0.0 UG 0 0 0 eth0
 
Old 08-16-2004, 11:49 PM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Can you ping the eth0 IP address of BoxA from BoxB

Have you enabled MASQUERADING on BoxA (using Iptables)
 
Old 08-17-2004, 12:27 AM   #3
Mortus Canis
LQ Newbie
 
Registered: Jun 2003
Location: Gonzaga University
Distribution: Slackware, RHEL
Posts: 23

Rep: Reputation: 15
As ppuru said, try enabling masquerading (a kind of NAT), as that is what worked for me.

Download the rc.firewall-2.4 script from http://www.ecst.csuchico.edu/~dranch...masq/examples/ and look at it, especially the NAT part, and you will understand better how to do it. That script should fix the problem, but know that is provides little security, and is only for testing purposes, and you will probably want to replace it at least with the rc.firewall-2.4-stronger, if not a better one you write yourself.
 
Old 08-17-2004, 06:18 PM   #4
linuxdoctor
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Smile

MASQUERADING worked like a charm. Thanks for your help while I still have some hair left.
 
  


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
Routing between 2 NICs Tinochelli Linux - Networking 4 12-09-2004 11:33 AM
routing/forwarding between multiple (3+) nics sublime Linux - Networking 2 07-26-2004 02:22 AM
routing two NICs to internet pero Linux - Networking 4 01-09-2004 04:36 PM
dual nics and routing dhill Linux - Networking 2 11-18-2003 10:12 AM
Routing with 3 nics _TK_ Linux - Networking 2 09-25-2001 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:26 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