mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
refact: simplified firewall interface
This commit is contained in:
parent
f140520037
commit
2d9764d026
3 changed files with 1 additions and 21 deletions
|
@ -14,9 +14,7 @@ type LinuxFirewall struct {
|
|||
}
|
||||
|
||||
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"
|
||||
IPV4ForwardingFile = "/proc/sys/net/ipv4/ip_forward"
|
||||
)
|
||||
|
||||
func Make() FirewallManager {
|
||||
|
@ -64,14 +62,6 @@ func (f LinuxFirewall) EnableForwarding(enabled bool) error {
|
|||
return f.enableFeature(IPV4ForwardingFile, enabled)
|
||||
}
|
||||
|
||||
func (f LinuxFirewall) EnableIcmpBcast(enabled bool) error {
|
||||
return f.enableFeature(IPV4ICMPBcastFile, enabled)
|
||||
}
|
||||
|
||||
func (f LinuxFirewall) EnableSendRedirects(enabled bool) error {
|
||||
return f.enableFeature(IPV4SendRedirectsFile, enabled)
|
||||
}
|
||||
|
||||
func (f *LinuxFirewall) EnableRedirection(r *Redirection, enabled bool) error {
|
||||
var opts []string
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue