Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Have you tried adding them as two separate rules? Iptables is a "first-match" firewall system, so it should work as you are expecting. And I don't scan your reasoning for why that can't work. Commented Nov 10, 2016 at 16:06
  • I thought about that but I think that if I add a rule for every interface except eth0 and after that I add the same rule but without tun0 that time, tun0 will enter the one that doesn't accept eth0. Commented Nov 10, 2016 at 16:14