On Mon, 11 Jun 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <(E-Mail Removed) .com>,
(E-Mail Removed) wrote:
>I have a four port NIC in Linux box and I wish to forward traffic from
>one port to another on the same machine.
A little ambiguous here - are you referring to different ports on the
NIC, as in eth0 verses eth1, or are you referring to port numbers as
defined in /etc/services? For forwarding traffic from one Ethernet
port to another, you need only have the appropriate routing tables
on the source and destination hosts (so that they know to send the
packets _via_ this Linux box), and the Linux box has to be told to
forward traffic (how this is configured depends on the distribution
which you haven't identified - though google.groups suggests this
might be Fedora FC6, in which case set "FORWARD_IPV4" to "true" in
the file /etc/sysconfig/network). If this is a service port change
(where packets directed to port 345/tcp get forwarded to the server
which is hiding on port 789/tcp), then you'll want to read the several
HOWTOs at
http://www.netfilter.org/documentation/HOWTO/, specifically
[TXT] NAT-HOWTO.txt 24-Dec-2006 16:06 25K
[TXT] netfilter-extensions-HOWTO.txt 24-Dec-2006 16:06 79K
[TXT] netfilter-hacking-HOWTO.txt 24-Dec-2006 16:06 84K
>I believe this can be done with IP-Tables, but can does this be done
>in software ( a kernel module may be ?).
It's ALL done in software - the hardware just sets there getting warm.
>I am new to this stuff and looking for pointers.
You may find it useful to review the FAQ that is posted to the Usenet
newsgroups 'comp.os.linux.misc' and 'comp.os.linux.setup' (among others)
twice a week. The subject is "A new reader? Welcome to $NEWSGROUP, read
this first if you're new here (FAQ)". You will also find an enormous
amount of help in the various HOWTOs that should be installed on your
system (look in /usr/share/HOWTO/ - if it's not there, try at
http://en.tldp.org/HOWTO/HOWTO-INDEX/howtos.html) and the twenty plus
books available on line at
http://tldp.org/guides.html
Old guy