Documentation
¶
Overview ¶
Package forwarder manages the FORWARD chain rules(meshnet and allowlist).
Index ¶
Constants ¶
View Source
const (
Ipv4fwdKernelParamName = "net.ipv4.ip_forward"
)
Variables ¶
View Source
var ( REMOVE operation = false ADD operation = true )
Used when adding or removing rules from firewall
Functions ¶
This section is empty.
Types ¶
type ForwardChainManager ¶
type ForwardChainManager interface { Enable() error ResetPeers(peers mesh.MachinePeers, lanAvailable bool, killswitch bool, enableAllowlist bool, allowlist config.Allowlist) error ResetFirewall(lanAvailable bool, killswitch bool, enableAllowlist bool, allowlist config.Allowlist) error Disable() error }
ForwardChainManager is responsible for managing rules in the FORWARD chain of iptables
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder manages the FORWARD chain in iptables
func NewForwarder ¶
func NewForwarder(interfaceNames []string, commandFunc runCommandFunc, sysctlSetter kernel.SysctlSetter) *Forwarder
NewForwarder create & initialize new Server
func (*Forwarder) ResetFirewall ¶
func (en *Forwarder) ResetFirewall(lanAvailable bool, killswitch bool, enableAllowlist bool, allowlist config.Allowlist) error
ResetFirewall resets forwarding rules using the stored peer list. If meshnet is not enabled, only allowlist related rules will be affected.
Click to show internal directories.
Click to hide internal directories.