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 12-07-2005, 09:54 AM   #1
muzzamil.luqman
LQ Newbie
 
Registered: Dec 2005
Distribution: fedora
Posts: 19

Rep: Reputation: 0
Forwarding traffic between 2 NICs!


MachineA is behind proxy
MachineB is behind MachineA

do i have to configure something on MachineA [one with 2 NICs]
to forward traffic between the two NICs
or it will do automatically???
 
Old 12-07-2005, 11:41 PM   #2
abakali
Member
 
Registered: Dec 2005
Location: karachi
Distribution: RedHat
Posts: 75

Rep: Reputation: 15
he i want to help you .But your post is not clear.I mean what are you trying to do.Tell us.
 
Old 12-08-2005, 01:58 AM   #3
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
are the two nics on seperate subnets, or the same subnet?
 
Old 12-08-2005, 02:04 AM   #4
muzzamil.luqman
LQ Newbie
 
Registered: Dec 2005
Distribution: fedora
Posts: 19

Original Poster
Rep: Reputation: 0
ok let me be more detailed

MachineA has got internet connection
with typical 192.168.x.x static

In order to share the internet connection among the two
Machines
i simply put another NIC in MachineA
I can use the same subnet or different, doesn't matter [i guess]
but MachineB is unable to access the internet connection
Any ideas, how it could be acheived???
 
Old 12-08-2005, 05:18 PM   #5
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
well, the easier method would be to have MachineB on a seperate subnet, then do the following :

*) Add a route on your proxy for the MachineB subnet, to point to MachineA

*) On Machine B, set the default gateway to be MachineA

*) Turn on ip forwarding in your networking config on MachineA. I think under fedora it should
be as easy as 'echo 1 > /proc/sys/net/ipv4/ip_forward' in a startup script, or setting an
ip_forward=yes flag in your networking options (not sure where to do this in fedora tho).

*) Add an iptables forwarding rule if you need to (ie: if your FORWARD policy is set to a default
deny)

*) Finally, make sure the proxy can NAT or proxy for the MachineB subnet. If it can't, then
you might have to NAT MachineA onto MachineB, but this could get messy, slow etc. and not
really advised.

Otherwise, depending on what sort of connectivity you want to provide MachineB, you could setup a HTTP/HTTPS/FTP Squid proxy on MachineA, or a general Socks proxy. This would bypass crazy routing stuff entirely.

Having the two machines on the same subnet would involve proxying the MAC's of MachineB and the router for arp requests etc, which you might not be up for doing.

I take it the proxy doesn't have multiple ethernet ports... ?

Last edited by angrybeaver; 12-08-2005 at 11:27 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
outbound web traffic load balancing across multiple nics univaco Linux - Networking 5 01-21-2009 01:25 PM
Forwarding local traffic to remote host: kernel development sl_king Programming 1 08-25-2005 06:53 PM
routing/forwarding between multiple (3+) nics sublime Linux - Networking 2 07-26-2004 02:22 AM
route any traffic between two NICs thirumala Linux - Networking 0 03-24-2004 05:54 PM
How to clear the traffic-counter of NICs? willow Linux - Networking 1 09-15-2002 03:37 PM

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

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