Packet change and redirect using ebtables

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Packet change and redirect using ebtables
# 1  
Old 04-06-2011
Packet change and redirect using ebtables

Hey all
I need your help with ebtables. I want to redirect traffic through local interfaces.
I have am Ubuntu linux machine with several NICs.
(I understand that ebtables is the same for RH)...
eth0 and eth1 are part of a bridge (br0) and they are connected to tap device. On eth0 I get traffic from network 10.10.10.0/24 to the internet.
Through eth1 I get the responses, internet addresses to 10.10.10.0/24.
None of the packets are destined to the linux host (on L3 and L2 as well).
My goal is to separate the traffic to other interfaces.
Every packet that enters eth0 with source ip 10.10.10.0/24 should be routed or redirected to eth3 (Packet should have the same source and destination IP but the frame should now contain a new SRC MAC, eth3's MAC).
The same applies to traffic that is coming in from eth1. I want to route it to eth4.
eth0 and eth1 are unidirectional, that means that I can't change the traffic and I'm only intercepting it.
Can you please help me build this filter using ebtables ?
I had no luck so far.
Thanks !!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Packet loss coming with big packet size ping

(5 Replies)
Discussion started by: Vishal_dba
5 Replies

2. IP Networking

Berkley Packet Filter

Hi Folks! Im trying to write a packet capture filter on a opnet device. The syntax there to write this filter is BPF. What I wanna do is to capture everything, but from a certain ip-range I just wanna capture the header and not the payload. For your understanding: We are writing our backup to... (1 Reply)
Discussion started by: ati
1 Replies

3. UNIX for Advanced & Expert Users

Delete all ebtables rules

Hi All, I configured a bridged debian firewall using bridging utilities. This works fine & I have been monitoring all users connecting to the internet & bandwidth usage. There are 2 interfaces eth0 & eth1 which i have configured as bridged interface br0. Today, I installed squid on the... (1 Reply)
Discussion started by: coolatt
1 Replies

4. Homework & Coursework Questions

filter packet

Exercise: Protection of WEB and DNS servers using the context-free rules for packet filtering: - Protect your WEB-server, so that would be for him can be accessed by browsers, and could go to dns. - Protect your primary DNS-server so that it could be to contact clients and secondary servers.... (1 Reply)
Discussion started by: numeracy
1 Replies

5. Cybersecurity

filter packet

Exercise: Protection of WEB and DNS servers using the context-free rules for packet filtering: - Protect your WEB-server, so that would be for him can be accessed by browsers, and could go to dns. - Protect your primary DNS-server so that it could be to contact clients and secondary servers.... (1 Reply)
Discussion started by: numeracy
1 Replies

6. IP Networking

Packet decoding

Hi, wondering if anyone can suggest a tool to me that will let me either cut & paste hex or type it in for packet decoding. I want to be able to decode a packet as done with tcpdump or wireshark, but I want to be able to manually input the hex myself. (2 Replies)
Discussion started by: Breakology
2 Replies

7. Programming

packet capture

can anyone tell me how can i capture the packets. i have tried ethernet software to capture them but its not doing what i want it to do it (1 Reply)
Discussion started by: dazdseg
1 Replies

8. Programming

Packet capturing using pcap

Hi, i am using a linux CentOS machine. I have 2 real network interfaces eth0, eth1 and 2 virtual interfaces tap0 and tap1. I am using PCAP library to capture the packets on theses interfaces. If i specify the interface as "any", i cannot find a way to know from which interface the packet... (1 Reply)
Discussion started by: rahulnitk2004
1 Replies

9. Programming

Real Packet Counter

Hello Experts, I want to program a realtime Packet counter, that is consist of two threads, first is packet counter engine and second is a (QTWidget)QT gui program(main process) for painting a real time chart, which classes or events are suitable for doing that? (OpenGL or Paint event or ...).note... (0 Replies)
Discussion started by: galaxy.ice
0 Replies

10. IP Networking

Seeing IP packet

Hi, Is there any way that i can directly take out the IP packet and see its contents. Waiting for your answer .............. Bye (4 Replies)
Discussion started by: manjunath
4 Replies
Login or Register to Ask a Question
Ns_ConnReturn(3aolserver)				   AOLserver Library Procedures 				 Ns_ConnReturn(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_ConnRedirect - Internally redirect a request to a new local url SYNOPSIS
#include "ns.h" int Ns_ConnRedirect(conn, url) ARGUMENTS
Ns_Conn conn (in) Pointer to open connection. char *url (in) Pointer to string of local url. _________________________________________________________________ DESCRIPTION
This routine can be used to internally redirect to a new, local url on the server. The url paramter specifies a path relative to the server, i.e., without the leading "http://host:port" portion. The server will reset the Ns_Request structure in the open connection pointed to by conn and restart connection handling, including authorization checks. The result is a standard AOLserver request procedure result code, either from an underlying call to Ns_ConnRunRequest or the result of one of the authorization response routines such as Ns_ConnReturnForbidden. Filter callbacks, if any, are not run again with the updated connection. The Ns_ConnRedirect routine is used internally in the server to support the basic file serving code (i.e., "fastpath") to redirect to spe- cific files when a directory is opened and by the Ns_RegisterRedirect routine to map standard reponse routines to user-provided local url's. EXAMPLE
The following example demonstrates redirecting to an ADP help page within a custom C-level request callback whenever a ?help=topic query argument is present: int MyRequest(void *arg, Ns_Conn *conn) { Ns_Set *query = Ns_ConnGetQuery(conn); /* Redirect to help.adp for /myrequest?help=topic calls. */ if (Ns_SetGet(query, "help")) != NULL) { return Ns_ConnReturnRedirect(conn, "/help.adp"); } ... handle non-help requests ... } SEE ALSO
Ns_RegisterRedirct(3), Ns_ConnRunRequest(3), Ns_AuthorizeRequest(3) KEYWORDS
connection, redirect AOLserver 4.0 Ns_ConnReturn(3aolserver)