summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
401c141)
We need the not matching DROP outside the main tapchain,
in a specific proto chain, and a ACCEPT in the main tap chain.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
}
if (defined($options->{layer2_protocols})){
}
if (defined($options->{layer2_protocols})){
+ my $protochain = $tapchain."-PROTO";
+ ruleset_addrule($ruleset, $tapchain, '', "-j $protochain");
+ ruleset_create_chain($ruleset, $protochain);
+
foreach my $proto (split(/,/, $options->{layer2_protocols})) {
foreach my $proto (split(/,/, $options->{layer2_protocols})) {
- ruleset_addrule($ruleset, $tapchain, "-p $proto", '-j ACCEPT');
+ ruleset_addrule($ruleset, $protochain, "-p $proto", '-j RETURN');
- ruleset_addrule($ruleset, $tapchain, '', "-j DROP");
- } else {
- ruleset_addrule($ruleset, $tapchain, '', '-j ACCEPT');
+ ruleset_addrule($ruleset, $protochain, '', '-j DROP');
+ ruleset_addrule($ruleset, $tapchain, '', '-j ACCEPT');
+
ruleset_addrule($ruleset, 'PVEFW-FWBR-OUT', "-i $iface", "-j $tapchain");
}
ruleset_addrule($ruleset, 'PVEFW-FWBR-OUT', "-i $iface", "-j $tapchain");
}