LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-30-2004, 10:21 PM   #1
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
IP forwarding from eth0 to eth1


I thought I had this working, but I guess not.

The backgroud information:
ETH0 is a gigabit card for the internal network.
ETH1 is a 10/100 for the Internet connection to be shared

For whatever reason, when I installed linux, the first ethernet card was assigned ETH1 and the second was ETH0. IP_FORWARD does have a value of 1, but it isn't forwarding traffic.

Is this because ETH0 should be the ISP assigned address and not the other way around?
Is there a way to switch the NICs value so that ETH0 is the 10/100? Would that help?

Any suggestions if I'm on the wrong track with my questions.
Thanks everyone
 
Old 07-31-2004, 12:25 AM   #2
Mortus Canis
LQ Newbie
 
Registered: Jun 2003
Location: Gonzaga University
Distribution: Slackware, RHEL
Posts: 23

Rep: Reputation: 15
I too had the same problem a few days ago!

There shouldn't be a problem having eth1 go to your isp, just check /sbin/route to make sure that your routing table is set up right.

To get IP Forwarding to start working, you need to set up some rules in iptables that implement NAT. I grabbed the latest rc.firewall script from http://www.ecst.csuchico.edu/~dranch...masq/examples/ and it started working, now I am customizing that script for my network.

Let us know where that takes you.
 
Old 07-31-2004, 01:37 AM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
The name of the device has nothing to do with it. What is the problem?

Are you trying to do NAT or do you want a bridge?
 
Old 07-31-2004, 09:54 PM   #4
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Original Poster
Rep: Reputation: 46
Trying to share an Internet connection with the home network. I used the same firewall I've used before which had NAT working perfectly, but I switched the ETH0 and ETH1 cause the other machine was setup so that ETH0 was the Internet

I'm going to check into the ideas above to see if that helps.
 
Old 07-31-2004, 10:56 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Check the routing with the route command. Is the gateway configured for eth1.

Of course verify your firewall script has the internal as eth0 and the external as eth1
 
Old 08-01-2004, 04:39 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
If the problem is the default route you may need to setup the internet interface as the primary in the ifcfg-eth? file.
 
  


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
forwarding a specific port from eth0 to eth1 zovres Linux - Networking 2 05-02-2006 10:01 PM
port forwarding from eth0 to eth1 ? overproof Linux - Networking 7 05-16-2005 02:48 AM
iptables: forwarding SSH connection: eth0 to eth1 hamish Linux - Networking 12 01-14-2005 03:07 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 07:32 PM

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

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