LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2007, 10:36 PM   #1
blu_alchemist
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Fedora Core 7
Posts: 31

Rep: Reputation: 15
2 Nics, One for nfs only


I have an apache webserver setup that uses nfs to save alot of files to a separate fileserver machine.

I wish to have eth1 used only for nfs traffic while eth0 handles everything else.

I also want to avoid using iptables and routing packages, is their a config file somewhere that i can tell something like:
10.10.0.125 inet_interface=eth1

Thanks!
 
Old 09-08-2007, 12:52 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Does this web server offer services to the internet. If so, you want to have one interface for internet traffic and one for LAN traffic. Being on separate subnets, you could simply use IP forwarding. You would also want to firewall off all services you don't want offered to the internet.
 
Old 09-08-2007, 02:12 AM   #3
blu_alchemist
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Fedora Core 7
Posts: 31

Original Poster
Rep: Reputation: 15
its only serving LAN purposes. Development webserver with file backend.

For simplicity sake its a stripped debian distro with no security at all.

Lets say this is my network map:
DHCP
|
Switch----Webserv----Fileserv
|
LAN

I remote X and ssh into that lan through a LAN machine which has security so at idle theirs no outside traffic.

Im trying to find out the easiest way that requires the least amount of packages. If theirs a simple .conf file or change to bind eth1 to specific ip traffic would be best.

If not please suggest an application and example config. thanks
 
Old 09-08-2007, 02:16 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Do I take it that you have both nics plugged into the same switch?

... looking at that map, though, it looks like eth1 is connected to Fileserv while eth0 is connected to the switch. At which point, I have trouble seeing the problem. (Especially if there is no through-traffic between the two sides.)

Last edited by Simon Bridge; 09-08-2007 at 02:21 AM.
 
Old 09-08-2007, 02:29 AM   #5
blu_alchemist
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Fedora Core 7
Posts: 31

Original Poster
Rep: Reputation: 15
DHCP
|
Switch----Webserv----Fileserv
|
LAN

the LAN is constantly communicating with the Webserver and modifying SQL tables, At the same time the Webserv is creating files and logs and writing them to the Fileserv.

I want the Fileserv to be completely cut off from the LAN and the two servers are connected with a crossover cable and static ip's but the mountd command polls eth0 before searching eth1 and I want it to automaticly search eth1 explicity when any command asks for something from subnet 10.10.0.xxx

Eventually their will be a switch between the webserv and fileserv and their will be many more application servers but I dont want alot of network sputter across wrong interfaces.

Last edited by blu_alchemist; 09-08-2007 at 02:31 AM.
 
Old 09-09-2007, 01:46 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Just configure fileserve for a different network address or subnet. When the webserver needs to access it the routing table will select the second interface. Don't enable ip_forward. Setting up the second interface should produce a route to it for you. You can check with "/sbin/route".

If the web server isn't offering an NFS service, close of that port on the firewall for the NFS service. You're setup is how many servers are setup. A cross over cable connects to a computer that is used solely for logs to that computer.
 
Old 09-10-2007, 06:21 PM   #7
blu_alchemist
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Fedora Core 7
Posts: 31

Original Poster
Rep: Reputation: 15
I found why linux was having difficulty connecting, I was using an old tulip 10/100 nic thats acting pretty flaky. Set up with a static ip they both appeared to connect fine but when the nfs request was made sometimes the eth1 would time out and it would poll eth0 for the nfs address then bounce back to eth1 and connect correctly.

I was getting alot of traffic on the filewall/lan switch from my nfs request so I thought it was a routing error. Guess cheap ass hardware is the source of all evil.

I just bought a bag of 25 3Com Fast EtherLink XL 3C905B-TX for $20 so that has solved many of my lans errors.

Thanks jschiwal, /sbin/route is equiv to the windooz arp command, is that table auto generated on boot or will manual entries persist?
 
  


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
Allowing NFS in IPTABLES: Fix port for NFS Lock Manager Swakoo Linux - General 10 08-25-2006 05:24 AM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
Intel D845GLLY + Multiple Intel Pro 100 NICs + kernel 2.6.x = NICs don't work egable Linux - Hardware 0 02-04-2005 02:30 PM
nfs client should it use tcp or udp to nfs serve rportmapper andersonas Linux - Networking 2 06-30-2004 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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