I would like to know the flow of a packet given the configuration below.

Suppose that I setup an adhoc network between my android phone and a NIC on my linux box. I then setup the android phone to use the NIC, wlan1, as its default gateway.

I have a proxy listening on port 8080. I want to redirect packets to that proxy.

I then want to forward those packets to the internet. So I forward them to wlan0 which is connected to my router.

According to the diagram here: http://www.iptables.info/en/structure-of-iptables.html

A packet either goes through the input stream (i.e. to my proxy) or the forward stream (i.e. to wlan0) . Is there no way to redirect and forward?

Additionally, the diagram lists "routing decisions" -- for instance in the input stream -- with only one arrow leaving the routing decision box. What kind of decision is one where there is only one outcome?

  • Consider drawing a diagram that shows your setup. – guntbert Jun 26 '16 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.