routes - Redirecting Ethernet traffic through another interface -
i'm working on project want redirect ethernet traffic through interface. setup follow:
i have computer working internet connection. have mbed lpc1768 board can connect usb computer. can upload binary file device , run it. example, can let act keyboard , send key strokes computer. can let device act mouse , send mouse events.
now want device act ethernet interface. since device connected using usb, thinking ethernet-over-usb protocol. i've chosen usbcdc-ecm protocol works on linux , os x. when plugging in device, device correctly identified ethernet interface. moreover, run dhcp server on embedded device computer gets assigned ip address. note device not have working internet connection outside world (the computer have one).
so embedded device can capture internet traffic computer. when device gets packet, want analyze packet, send computer , have redirected through working interface.
so example, have laptop , working connection on interface wlan0
. plug in device. gets assigned interface eth0
. eth0
preferred interface on computer traffic goes eth0
. capture traffic on device , want send traffic computer , route on wlan0
(or other working interface). basically, want create device captures data , send computer, acting middleware usb device internet traffic.
is possible do? prefer not modify settings on os , let device manage it. primary os ubuntu 14.04 not care windows or os x @ moment. also, there alternatives this? maybe usbcdc-ecm not best choice this.
any highly appreciated.
i not sure try accomplish, if device shows ethernet connection, can't use iptables redirect traffic device?
else can let device act dns server , handle incoming dns lookups , redirect them. wild thought.
Comments
Post a Comment