LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-10-2006, 10:33 AM   #1
gianman
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
packet cloning and routing with single NIC


Hi,
I need help to setup a linux box with a single NIC to solve this problem:
On the same LAN ( 10.10.10.0) there are one ethernet device and 2 PCs connected with a switch.
The device act as a server on port 5000 but can accept only 1 connection ( unfortunately is proprietary software...)
Te PCs are windows machine, and works in mirror, for redundancy purpose, and they must have the same data input from the server, but for the server limitation, only one of them can connect to.

the idea is to put a linux box with its NIC connected to the switch on the same LAN, in order to receive packets from PCs and route them to the device and viceversa, take the packet from the device and route to both PCs.
I've seen the iptables, I'm completely new about it, so I ask help...

First problem:
I'm triyng to realize the ip and port redirection from Pc to device using PREROUTING and DNAT, but it doesn't work...
10.10.10.2 : device ip
10.10.10.3 : Pc1 ip
10.10.10.4 : Pc2 ip
10.10.10.10 linux box ip

PC1 connection on linux box is on port 5500
PC2 connection on linux boxis on port 5501

iptables -D PREROUTING -t nat -p tcp -d 10.10.10.10 --dport 5500 -j DNAT --to 10.10.10.2:5000
iptables -D PREROUTING -t nat -p tcp -d 10.10.10.10 --dport 5501 -j DNAT --to 10.10.10.2:5000

this rules works only for port redirection, not for IP redirection...
where am I wrong?

Second problem:
I have no idea on how realize the data flow Device --> PCs , cloning the packet from the device.
Infact each PC must have the same tcp packet in input to work for redundancy.
I'have seen the mangle -tee option, but I'm quite confusing on how to use it.
Can someone clarify ( maybe with some examples..)?

Is there any other way to do this job?

Tnks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 on a single Interface bernard7 Linux - Networking 2 05-01-2006 04:06 PM
problems routing with single NIC bravo_veinticinco Linux - Networking 1 12-16-2005 03:30 AM
Single NIC of Reverse Proxy Natterjack Toad Linux - Networking 0 10-28-2004 03:08 AM
how to configure firewall on single nic RajaRC Linux - Networking 3 10-15-2004 06:16 AM
Halted packet filtering+routing+shaping router or bridge? Norel Linux - Networking 0 05-02-2002 06:43 AM

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

All times are GMT -5. The time now is 09:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration