mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-16 16:34:09 +02:00
feat(dns): restrict plain DNS output traffic
This commit is contained in:
@@ -2,6 +2,7 @@ package firewall
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func (c *Config) runMixedIptablesInstructions(ctx context.Context, instructions []string) error {
|
||||
@@ -19,3 +20,15 @@ func (c *Config) runMixedIptablesInstruction(ctx context.Context, instruction st
|
||||
}
|
||||
return c.runIP6tablesInstruction(ctx, instruction)
|
||||
}
|
||||
|
||||
func (c *Config) runIPv4AndV6IptablesInstructions(ctx context.Context,
|
||||
ipv4Instructions, ipv6Instructions []string,
|
||||
) error {
|
||||
if err := c.runIptablesInstructions(ctx, ipv4Instructions); err != nil {
|
||||
return fmt.Errorf("running iptables instructions: %w", err)
|
||||
}
|
||||
if err := c.runIP6tablesInstructions(ctx, ipv6Instructions); err != nil {
|
||||
return fmt.Errorf("running ip6tables instructions: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user