Commit Graph

9 Commits

Author SHA1 Message Date
Kevin Krakauer b2a881784c Built dead-simple traversal, but now getting depedency cycle error :'( 2020-01-08 14:48:47 -08:00
Kevin Krakauer 447f64c561 Added test for unconditional DROP on the filter INPUT chain 2020-01-08 12:48:17 -08:00
Kevin Krakauer 2f02e15e54 Newline 2020-01-08 11:17:15 -08:00
Kevin Krakauer 899309c4eb Revert filter_input change 2020-01-08 11:16:41 -08:00
Kevin Krakauer 1e1921e2ac Minor fixes to comments and logging 2020-01-08 11:15:46 -08:00
Kevin Krakauer 8cc1c35bbd Write simple ACCEPT rules to the filter table.
This gets us closer to passing the iptables tests and opens up iptables
so it can be worked on by multiple people.

A few restrictions are enforced for security (i.e. we don't want to let
users write a bunch of iptables rules and then just not enforce them):

- Only the filter table is writable.
- Only ACCEPT rules with no matching criteria can be added.
2020-01-08 10:08:14 -08:00
Kevin Krakauer ed60bc326b Fix readme formatting.
PiperOrigin-RevId: 288402480
2020-01-06 16:49:34 -08:00
Kevin Krakauer 64d00cc63d Internal change.
PiperOrigin-RevId: 286083614
2019-12-17 16:21:48 -08:00
Kevin Krakauer be2754a4b9 Add iptables testing framework.
It would be preferrable to test iptables via syscall tests, but there are some
problems with that approach:

* We're limited to loopback-only, as syscall tests involve only a single
  container. Other link interfaces (e.g. fdbased) should be tested.
* We'd have to shell out to call iptables anyways, as the iptables syscall
  interface itself is too large and complex to work with alone.
* Running the Linux/native version of the syscall test will require root, which
  is a pain to configure, is inherently unsafe, and could leave host iptables
  misconfigured.

Using the go_test target allows there to be no new test runner.

PiperOrigin-RevId: 285274275
2019-12-12 14:42:11 -08:00