Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-11-2012, 02:24 PM   #1
LQ Newbie
Registered: Oct 2011
Location: Stoke on Trent, UK
Distribution: Debian
Posts: 6

Rep: Reputation: Disabled
Can i use iptables to redirect all outbound ethernet traffic to an........

Can i use iptables to redirect outbound ethernet traffic to an interface other than that it was originally destined for?

Or can anyone suggest another route?

Heres the details to clarify what im trying to do.

I have a router that is actally a physically seperate router and adsl modem on one board. The router part runs linux and has an ethernet connection through one of its switch ports to the adsl part. The adsl chip runs some pppoe to atm conversion software. Control communication between the chips is via some mac protocol that requires no ip address.

The control part is easy, i have found the exact tool i need for it but, i have tried the regular linux pppoe programs and setup and i cant get any response from the modem part. It's not a failure in authentication or a problem with the chips not being able to hear each other, i have already checked and verified this (i can sniff when i use my own firmware and the control software works).

Everything does work sound with the factory standard stuff but im very limited to the tools i can use to sniff whats being sent by the ppp client and verify whether its using proper pppoe or some specific or mangled in house variation.

I do have iptables and was thinking of redirecting the traffic from the port internal to the board to a port that i can connect to externally and then spoof the adsl parts mac address on this port while sniffing.

Any ideas?

Old 07-13-2012, 04:50 AM   #2
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 866

Rep: Reputation: 264Reputation: 264Reputation: 264
Unfortunately for you iptables requires actual ip packets to work and what your working with there doesn't use ip packets but ethernet ones.

Your only chance is if you can using bridging tools to force the packets to be repeated onto another port and then sniff that port.
Old 07-13-2012, 05:16 AM   #3
LQ Newbie
Registered: Oct 2011
Location: Stoke on Trent, UK
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks. I was actually expecting that to be the answer.

After posting the question i suddenly thought ebtables. Never used it before but i do have it here. Unfortunately it seems the stuff i need hasn't been compiled in or the modules have not been built.

i tried using something like

ebtables -t nat -A PREROUTING -d 00:11:22:33:44:55 -i eth0 -j dnat --to-destination 54:44:33:22:11:00

this results in a bad table name error

Im thinking something might work in the brouting table but im still trying there.


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
iptables redirect local ip traffic roof-us Linux - Networking 3 12-07-2011 09:56 AM
Using IPTABLES to redirect web traffic to another network. slugman92 Linux - Networking 1 04-20-2011 05:41 PM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
iptables outbound traffic to all ports sunlinux Linux - Security 1 12-01-2007 10:46 AM
Blocking specific outbound traffic - iptables mistersnorfles Linux - Security 5 08-08-2007 02:14 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration