Documentation ¶
Index ¶
- Constants
- type FirewallManager
- type LinuxFirewall
- func (f LinuxFirewall) EnableForwarding(enabled bool) error
- func (f LinuxFirewall) EnableIcmpBcast(enabled bool) error
- func (f *LinuxFirewall) EnableRedirection(r *Redirection, enabled bool) error
- func (f LinuxFirewall) EnableSendRedirects(enabled bool) error
- func (f LinuxFirewall) IsForwardingEnabled() bool
- func (f LinuxFirewall) Restore()
- type Redirection
Constants ¶
View Source
const ( IPV4ForwardingFile = "/proc/sys/net/ipv4/ip_forward" IPV4ICMPBcastFile = "/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts" IPV4SendRedirectsFile = "/proc/sys/net/ipv4/conf/all/send_redirects" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirewallManager ¶
type FirewallManager interface { IsForwardingEnabled() bool EnableForwarding(enabled bool) error EnableIcmpBcast(enabled bool) error EnableSendRedirects(enabled bool) error EnableRedirection(r *Redirection, enabled bool) error Restore() }
func Make ¶
func Make() FirewallManager
type LinuxFirewall ¶
type LinuxFirewall struct {
// contains filtered or unexported fields
}
func (LinuxFirewall) EnableForwarding ¶
func (f LinuxFirewall) EnableForwarding(enabled bool) error
func (LinuxFirewall) EnableIcmpBcast ¶
func (f LinuxFirewall) EnableIcmpBcast(enabled bool) error
func (*LinuxFirewall) EnableRedirection ¶
func (f *LinuxFirewall) EnableRedirection(r *Redirection, enabled bool) error
func (LinuxFirewall) EnableSendRedirects ¶
func (f LinuxFirewall) EnableSendRedirects(enabled bool) error
func (LinuxFirewall) IsForwardingEnabled ¶
func (f LinuxFirewall) IsForwardingEnabled() bool
func (LinuxFirewall) Restore ¶
func (f LinuxFirewall) Restore()
type Redirection ¶
type Redirection struct { Interface string Protocol string SrcAddress string SrcPort int DstAddress string DstPort int }
func NewRedirection ¶
func (Redirection) String ¶
func (r Redirection) String() string
Click to show internal directories.
Click to hide internal directories.