Re: Redirecting ethernet packets to same host

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.user,gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
On Friday 29 October 2004 07:41, Phani Kumar wrote:
> Hi,
>   I want to redirect all the packets coming to the bridge to the same
> hosts.
> (At which part of the code I have to make changes to do above task).
>
> i.e I am displaying the the default home page of the bridge for every
> unathenticated user.
> (I have lookup table containing all the authenticated users).
>
> This is because I am forcing the unauthenticated user to first register.
>
> Hoping for a solution for my problem

if you want traffic from $IP1 to be redirected to $IP2, just set up your 
bridge and add
iptables -t nat -A PREROUTING -s $IP1 -j DNAT --to-destination $IP2

cheers,
Bart



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.