Score:0

Forwarding traffic between two interfaces on Linux: bridge or iptables?

cn flag

If I have two interfaces, eg. wlan0 (wireless clients on the home network) and eth0 (Ethernet interface with Internet traffic) and I'd like to forward traffic between them, I could try to:

  • create a bridge between them
  • use iptables.

This question is about what is the key difference between the two solutions.

The example that uses a bridge is this "Turn your Raspberry Pi into an AP" tutorial - step 8. In the tutorial, there are eth0 and wlan0 interfaces and the traffic needs to be forwarded between the two.

As for the "just iptables solution", this answer suggests not using a bridge: see this serverfault question. An example using iptables only can be found here.

What are the key differences between the two options? When should one be used and when should another be used?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.