From 5212dba7cb227407212ad1a417e40bb5c486fd25 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 18 Apr 2016 10:13:05 -0700 Subject: [PATCH] Add an ESTABLISHED,RELATED rule for docker0 Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Misc.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Shorewall/Perl/Shorewall/Misc.pm b/Shorewall/Perl/Shorewall/Misc.pm index cc6eb15b2..c291410c2 100644 --- a/Shorewall/Perl/Shorewall/Misc.pm +++ b/Shorewall/Perl/Shorewall/Misc.pm @@ -646,6 +646,7 @@ sub create_docker_rules() { add_commands( $chainref, 'if [ -n "$g_docker" ]; then' ); incr_cmd_level( $chainref ); add_ijump( $chainref, j => 'DOCKER', o => 'docker0' ); + add_ijump( $chainref, j => 'ACCEPT', o => 'docker0', state_imatch 'ESTABLISHED,RELATED' ); add_ijump( $chainref, j => 'ACCEPT', i => 'docker0', o => '! docker0' ); add_ijump( $chainref, j => 'ACCEPT', i => 'docker0', o => 'docker0' ) if $dockerref->{options}{routeback}; add_ijump( $filter_table->{OUTPUT}, j => 'DOCKER' );